BookmarkSubscribeRSS Feed
AlexeyS
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

1 REPLY 1
M_Maldonado
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!

-Miguel

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3269 views
  • 0 likes
  • 2 in conversation