Skip to content

DOC Remove mention of deprecated multi_class in LogisticRegression - #29998

Merged
glemaitre merged 2 commits into
scikit-learn:mainfrom
lucyleeow:doc_logreg
Oct 8, 2024
Merged

glemaitre merged 2 commits into
scikit-learn:mainfrom
lucyleeow:doc_logreg

Conversation

@lucyleeow

@lucyleeow lucyleeow commented Oct 3, 2024 •

Copy link
Copy Markdown
Member

Reference Issues/PRs

multi_class deprecated in #28703

What does this implement/fix? Explain your changes.

  • Remove mention of deprecated multi_class in LogisticRegression. Also moves the section on multiclass down, as it seems to make sense to introduce the class first.
  • Add some links to multiclass term, OvR class
  • Amend (solver) 'Table' link to be directly to the section with the table

Any other comments?

@github-actions

github-actions Bot commented Oct 3, 2024 •

Copy link
Copy Markdown

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 4a14346. Link to the linter CI: here

@jeremiedbb

Copy link
Copy Markdown
Member

Since multi_class was deprecated in 1.5, it will be removed only in 1.7 while the upcoming release is 1.6. Shouldn't we keep content related to multi_class for the until them ?

@glemaitre
glemaitre self-requested a review October 3, 2024 13:03

@glemaitre glemaitre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm inline with the changes since we can already advocate to use OneVsRestClassifier instead of the parameter. I find it complementary to the deprecation warning.

Comment thread doc/modules/linear_model.rst Outdated
| `ElasticNet` | :math:`\frac{1 - \rho}{2}\|W\|_F^2 + \rho \|W\|_{1,1}` |
+----------------+----------------------------------------------------------------------------------+

.. _Logistic_regression_solvers:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe drop the capital letter if possible.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I agree its weird with the capital. I initially thought I should copy what was used as reference header for logistic regression main section:

.. _Logistic_regression:

the L2 penalty. The Elastic-Net regularization is only supported by the
'saga' solver.

For :term:`multiclass` problems, only 'newton-cg', 'sag', 'saga' and 'lbfgs'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremiedbb Since we are in the long summary and we have an alternative to use OvR, I would advocate from now on to use OneVsRestClassifier. It looks legit to me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright then :)

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once guillaume's comment is resolved

@glemaitre
glemaitre merged commit 7566d30 into scikit-learn:main Oct 8, 2024
@glemaitre

Copy link
Copy Markdown
Member

Thanks @lucyleeow

LGTM.

BenJourdan pushed a commit to gregoryschwartzman/scikit-learn that referenced this pull request Oct 11, 2024
@lucyleeow
lucyleeow deleted the doc_logreg branch October 24, 2024 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants