Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further improve generate_new_combinations
The apriori-gen function described in section 2.1.1 of Apriori paper has two steps; the first step had been implemented in 96dfd4d. The second step of apriori-gen function is called prune step, it takes candidates c from first step and check that all (k-1) tuples built by removing any single element from c is in L(k-1). Efficient lookups require some dedicated data structure; Apriori paper describes how to do it with hash-trees; it is also possible to use prefix trees (also knows as tries). This commit uses third-party pygtrie module, to check whether this step provides performance improvements in our case. It can then be decided to either keep this import or write a stripped down implementation.
- Loading branch information