-
Notifications
You must be signed in to change notification settings - Fork 875
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
Most recent scikit-learn results in several failed unit tests #1091
Conversation
- Marked :test:`test_StackingClassifier` as skip because scikit-learn implemented its own :class:`StackingClassifier` in 0.22.
- Formatted with isort, black, flake8.
- Skipping all failing unit tests related to :class:`StackingClassifier` as they don't align with `scikit-learn`'s implementation.
As noted in the past few commit messages, @rasbt, should the |
- Skipping failed unit tests because scikit-learn's StackingClassifier has built-in cross-validation support.
- Updated scikit-learn version to 1.3.1 modified: environment.yml - Updated scikit-learn version to 1.3.1 modified: requirements.txt - Updated scikit-learn version to 1.3.1
- Updated failing unit test to compare output directly instead of converting to numpy arrays (which results in errors unless the dtype is set to object).
- Skipping `test_gridsearch_replace_mix` as it uses `StackingCVRegressor` when `scikit-learn` has its own implementation as of 0.22.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1091 +/- ##
==========================================
+ Coverage 77.26% 78.29% +1.02%
==========================================
Files 200 196 -4
Lines 11297 11140 -157
Branches 1513 1404 -109
==========================================
- Hits 8729 8722 -7
+ Misses 2350 2200 -150
Partials 218 218 ☔ View full report in Codecov by Sentry. |
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