New Features
- The
SequentialFeatureSelectornow supports using pre-specified feature sets via thefixed_featuresparameter. (#578) - Adds a new
accuracy_scorefunction tomlxtend.evaluatefor computing basic classifcation accuracy, per-class accuracy, and average per-class accuracy. (#624 via Deepan Das) StackingClassifierandStackingCVClassifiernow have adecision_functionmethod, which serves as a preferred choice overpredict_probain calculating roc_auc and average_precision scores when the meta estimator is a linear model or support vector classifier. (#634 via Qiang Gu)
Changes
- Improve the runtime performance for the
apriorifrequent itemset generating function whenlow_memory=True. Settinglow_memory=False(default) is still faster for small itemsets, butlow_memory=Truecan be much faster for large itemsets and requires less memory. Also, input validation forapriori, ̀ fpgrowthandfpmaxtakes a significant amount of time when input pandas DataFrame is large; this is now dramatically reduced when input contains boolean values (and not zeros/ones), which is the case when usingTransactionEncoder`. (#619 via Denis Barbier) - Add support for newer sparse pandas DataFrame for frequent itemset algorithms. Also, input validation for
apriori, ̀ fpgrowthandfpmax` runs much faster on sparse DataFrame when input pandas DataFrame contains integer values. (#621 via Denis Barbier) - Let
fpgrowthandfpmaxdirectly work on sparse DataFrame, they were previously converted into dense Numpy arrays. (#622 via Denis Barbier)
Bug Fixes
- Fixes a bug in
mlxtend.plotting.plot_pca_correlation_graphthat caused the explaind variances not summing up to 1. Also, improves the runtime performance of the correlation computation and adds a missing function argument for the explained variances (eigenvalues) if users provide their own principal components. (#593 via Gabriel Azevedo Ferreira) - Behavior of
fpgrowthandaprioriconsistent for edgecases such asmin_support=0. (#573 via Steve Harenberg) fpmaxreturns an empty data frame now instead of raising an error if the frequent itemset set is empty. (#573 via Steve Harenberg)- Fixes and issue in
mlxtend.plotting.plot_confusion_matrix, where the font-color choice for medium-dark cells was not ideal and hard to read. #588 via sohrabtowfighi) - The
svdmode ofmlxtend.feature_extraction.PrincipalComponentAnalysisnow also n-1 degrees of freedom instead of n d.o.f. when computing the eigenvalues to match the behavior ofeigen. #595 - Disable input validation for
StackingCVClassifierbecause it causes issues if pipelines are used as input. #606