Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no pruning in Apriori function #24

Open
zoeleesss opened this issue Jun 21, 2018 · 1 comment
Open

no pruning in Apriori function #24

zoeleesss opened this issue Jun 21, 2018 · 1 comment

Comments

@zoeleesss
Copy link

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
@chonyy
Copy link

chonyy commented Nov 27, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants