BookmarkSubscribeRSS Feed
Pyrite | Level 9

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

Barite | Level 11

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!



Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 2 in conversation