Closed it176131 closed 3 months ago
As noted in the past few commit messages, scikit-learn
implemented a StackingClassifier
and StackingRegressor
in 0.22 with a different API. Because of this, some of the current unit tests fail as they don't expose the necessary attributes.
@rasbt, should the mlxtend
versions of the StackingClassifier
and StackingRegressor
be replaced with the scikit-learn
implementations? Or renamed (so to not cause confusion) and modified to pass the tests?
Attention: Patch coverage is 86.36364%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 78.29%. Comparing base (
ad06b2d
) to head (d61928a
). Report is 8 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
mlxtend/classifier/stacking_cv_classification.py | 50.00% | 2 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@rasbt, should the mlxtend versions of the StackingClassifier and StackingRegressor be replaced with the scikit-learn implementations? Or renamed (so to not cause confusion) and modified to pass the tests?
I would prefer to keep them as the scikit-learn port is not 1:1 equivalent, and the stacking classifiers here had some advantages (and disadvantages). I can update the unit tests to add them back, no worries!
@rasbt, should the mlxtend versions of the StackingClassifier and StackingRegressor be replaced with the scikit-learn implementations? Or renamed (so to not cause confusion) and modified to pass the tests?
I would prefer to keep them as the scikit-learn port is not 1:1 equivalent, and the stacking classifiers here had some advantages (and disadvantages). I can update the unit tests to add them back, no worries!
Good team work! Once this is merged I'll sync my other branch and hopefully all the tests will pass 🤞
Description
This handles the failing unit tests when
scikit-learn
is 1.3.1 or higher.Related issues or pull requests
1090
1085
1087
Pull Request Checklist
./docs/sources/CHANGELOG.md
file (if applicable)./mlxtend/*/tests
directories (if applicable)mlxtend/docs/sources/
(if applicable)PYTHONPATH='.' pytest ./mlxtend -sv
and make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g.,PYTHONPATH='.' pytest ./mlxtend/classifier/tests/test_stacking_cv_classifier.py -sv
)flake8 ./mlxtend