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

Merged
merged 3 commits into from
Jan 10, 2025

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

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.47%. Comparing base (c2c1648) to head (823f73d).
Report is 33 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    73294     +195     
==========================================
+ Hits        64659    64850     +191     
- Misses       8440     8444       +4     

@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
@markotoplak markotoplak force-pushed the logistic-no-multiclass branch 2 times, most recently from 8660a32 to 823f73d Compare January 9, 2025 19:07
@janezd janezd self-assigned this Jan 10, 2025
@janezd janezd force-pushed the logistic-no-multiclass branch from 823f73d to 935f126 Compare January 10, 2025 17:15
janezd and others added 2 commits January 10, 2025 18:21
@janezd janezd force-pushed the logistic-no-multiclass branch from 935f126 to 6a7efa1 Compare January 10, 2025 17:21
@janezd janezd merged commit 876acb2 into biolab:master Jan 10, 2025
25 of 28 checks passed
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