forked from rasbt/mlxtend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of apriori (rasbt#619)
* minor performance improvements in apriori old_combination is sorted, thus its max() is its last element. Since items_types_in_previous_step is a Numpy array, we can find all valid elements with a single call, which makes inner loop shorter. * minor performance improvements in apriori Let generate_new_combinations return ints instead of tuples, and collect them with np.fromiter. Slower with low_memory=True, this will be fixed by next commit. * improve performance of apriori with low_memory=True Verbose output has to be modified, since we loop on valid combinations only. Performance is now equivalent to better than version with low_memory=False. Adjust test_fpbase.py output. * fixes for flake8 * speed up valid_input_check for boolean dataframes If all columns are boolean, there is nothing to check. In apriori.py, call valid_input_check. * add changelog entry Replace 0/1 by False/True in docstrings of apriori, fpgrowth and fpmax to promote usage of boolean arrays.
- Loading branch information
Showing
6 changed files
with
145 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters