Replies: 1 comment
-
|
I had no idea and really appreciate the note! Just addressed it here: #206. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Newer versions of scikit-learn (v1.6.0 onwards) changed how they detect the type of an estimator (i.e. classifier vs. regressor). Previous versions relied on the
_estimator_typeattribute of the estimator. Newer versions however read theestimator_typetag instead, which is a tag that's defined both by theBaseEstimatorand theClassifierMixinclasses (see the actual code change for more details).So the following class (from chapter 7 of the Machine Learning with PyTorch and Scikit-Learn book) will start throwing warnings:
Warnings will look like this:
The reason is that the tag values are based on whatever
BaseEstimatorprovides (which in theestimator_typecase, it's justNone). To make the example work, you can just reverse the order of the parent classes ofMajorityVoteClassifier, so that the tags provided byClassifierMixintake precedence:Beta Was this translation helpful? Give feedback.
All reactions