Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

The Apriori Algorithm - Pruning

Reply
Contributor
Posts: 61

The Apriori Algorithm - Pruning

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.

Thank you

Super Contributor
Posts: 337

Re: The Apriori Algorithm - Pruning

[ Edited ]

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!

-Miguel

Ask a Question
Discussion stats
  • 1 reply
  • 1146 views
  • 0 likes
  • 2 in conversation