08-29-2015 08:42 AM
Hello, i have a question about Pruning in the Apriori Algorithm.
for example, i have a 4-itemset : Milk-Eggs-Bread-Beer(as abcd)
I want to check pruning : if 4-itemset that consist of different 3-itemset, Milk-Eggs-Bread; Milk-Eggs-Beer ;Milk-Bread-Beer ...... was in the last step.
how to divide this 4-itemset for all diffrent options 3-itemset?
in addition maybe you can advice me how to work and save all the itemsets? i never worked with this kind of algorithms.
09-09-2015 09:17 PM - edited 09-09-2015 09:19 PM
If you are using SAS Enterprise Miner, you can use the Association node to calculate the confidence and support of rules for your items, and to filter them out if they are below certain values. In this discussion (link here) you can find a good overview of how this node generate rules using proc assoc and proc rulegen behind the scenes.
There are usually two steps in "pruning" for the apriori algorithm. First pruning step: you will not consider rules that do not have a minimum frequency in your training set; second: you will reject rules below a minimum support. The word pruning is confusing in this context because it makes you think about decision trees. It is more a filtering than a pruning if you ask me, but it seems the term is here to stay.
I hope this helps!