Skip to content
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

LogisticRegressionLearner: Remove deprecated argument 'multi_class' #6956

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Dec 13, 2024

Issue

As per https://scikit-learn.org/1.5/modules/generated/sklearn.linear_model.LogisticRegression.html,

Deprecated since version 1.5: multi_class was deprecated in version 1.5 and will be
removed in 1.7. From then on, the recommended ‘multinomial’ will always be used
for n_classes >= 3. Solvers that do not support ‘multinomial’ will raise an error. Use
sklearn.multiclass.OneVsRestClassifier(LogisticRegression()) if you still want to use OvR.
Description of changes

Remove the argument.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd force-pushed the logistic-no-multiclass branch from f04e655 to 57f85cc Compare December 13, 2024 16:50
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.47%. Comparing base (c2c1648) to head (57f85cc).
Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6956      +/-   ##
==========================================
+ Coverage   88.45%   88.47%   +0.02%     
==========================================
  Files         331      332       +1     
  Lines       73099    73277     +178     
==========================================
+ Hits        64659    64834     +175     
- Misses       8440     8443       +3     

@markotoplak
Copy link
Member

In _initialize_wrapped we'd also have to switch the l1 solver to "saga", because "liblinear" does not support "multiclass".

@janezd janezd force-pushed the logistic-no-multiclass branch from 57f85cc to b0ed95d Compare December 14, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants