-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
MNT clean-up deprecations for 1.7: multi_class in LogisticRegression #31241
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
MNT clean-up deprecations for 1.7: multi_class in LogisticRegression #31241
Conversation
First of all, sorry for this mistake. I would actually dare to carry out the deprecation in 1.7 and see if anybody complains. I have heard so many complaints about scikit-learn, but never about deprecations and their settlement . |
Well I think I reviewed your PR so we share it :)
Maybe because we're cautious about backward compatibility and because we take care to break their code without notice 😉
It crossed my mind, but I think it's better to do the right thing. It could be a pain for some users while keeping the deprecated code 1 more release for us is not an major issue (it might delay some refactorings in logistic regression if planned though). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this PR's approach of raising a deprecation warning first.
Let's also include a changelog entry. One cycle for a deprecation warning is shorter than normal.
We should still add to changelog so people know about it. One cycle for a deprecation warning is shorter than normal.
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeremiedbb It seems I forgot to update the solver table in the docstring of LogisticRegression
: newton-cholesky
now supports multiclass!!!
Could you update that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeremiedbb thanks
When cleaning-up the deprecation of the
multi_class
parameter, I found that we haven't been raising a warning the last 2 versions for the following situation:In this setting it falls back to OVR because liblinear doesn't support multinomial. However the deprecation of
multi_class
implied that all multiclass problems would be fitted using the multinomial loss and that an error would be raised if a solver doesn't support it. SeeThat's an issue because doing it for 1.7 would break code that was working until now without any FutureWarning.
A pragmatic solution is to delay the deprecation clean-up and raise a warning for this specific case for 1 more release (I don't think we really need 2 here). This is what I implemented in this PR. What do you think @lorentzenchr @ogrisel ?
Do you think it's worth a new specific changelog entry ? I feel like the one in v1.5.rst is enough.