Skip to content

DOC: Fix penalty deprecation docs for LogisticRegression and LogisticRegressionCV - #34107

Merged
jeremiedbb merged 4 commits into
scikit-learn:mainfrom
baynecheke:fix-logistic-regression-penalty-docs
May 25, 2026
Merged

jeremiedbb merged 4 commits into
scikit-learn:mainfrom
baynecheke:fix-logistic-regression-penalty-docs

Conversation

@baynecheke

Copy link
Copy Markdown
Contributor

DOC Fix penalty deprecation docs for LogisticRegression and LogisticRegressionCV

Reference Issues/PRs

Fixes #34090

What does this implement/fix? Explain your changes.

The deprecation notice for the penalty parameter in LogisticRegression
and LogisticRegressionCV was missing the penalty=None case. Users who
relied on penalty=None had no guidance on the equivalent new API (C=np.inf).

The FutureWarning raised at runtime was also missing the penalty='elasticnet'
case for LogisticRegression, and missing both elasticnet and None cases for
LogisticRegressionCV.

This PR adds the missing cases and fixes a typo in both docstrings
('penalty='elasticnet' → penalty='elasticnet').

AI usage disclosure

I used AI assistance for:

  • Documentation (including examples)

@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.

Thanks for the PR @baynecheke. I removed the chagelog entry because we don't include that for doc or change in messages. LGTM

@jeremiedbb
jeremiedbb enabled auto-merge (squash) May 25, 2026 09:58
@jeremiedbb
jeremiedbb merged commit 7d52952 into scikit-learn:main May 25, 2026
31 checks passed
@kuraga

kuraga commented May 26, 2026

Copy link
Copy Markdown

@baynecheke , thanks very much!

AI usage disclosure: I used AI assistance for: Documentation (including examples)

One off-topic question: where could AI be applied here? (:

@jeremiedbb jeremiedbb mentioned this pull request Jun 1, 2026
16 tasks done
jeremiedbb added a commit that referenced this pull request Jun 2, 2026
…ticRegressionCV (#34107)

Co-authored-by: Jérémie du Boisberranger <[email protected]>
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
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.

linear_model.LogisticRegression's penalty=None case documentation

3 participants