Apriori icon indicating copy to clipboard operation
Apriori copied to clipboard

no pruning in Apriori function

Open zoeleesss opened this issue 7 years ago • 1 comments

This is what we should implement in code with pruning.

  1. Let k=1
  2. Generate frequent itemsets of length k
  3. Repeat until no new frequent itemsets are identified
  • Generate length (k+1) candidate itemsets from length k frequent itemsets
  • Prune candidate itemsets containing subsets of length k+1 that are infrequent
  • Count the support of each candidate by scanning the DB
  • Eliminate candidates that are infrequent, leaving only those that are frequent

zoeleesss avatar Jun 21 '18 12:06 zoeleesss

Hi @zoeleesss , I have written one that included the pruning step that you expected. It's also a Python implementation of Apriori algorithm. Feel free to check it out! https://github.com/chonyy/apriori_python

chonyy avatar Nov 27 '20 13:11 chonyy