Repository navigation
FIX LogisticRegressionCV with explicit scorer and missing classes in CV folds - #32828
Merged
OmarManzoor merged 10 commits intoFeb 21, 2026
Merged
OmarManzoor merged 10 commits into
OmarManzoor merged 10 commits into
Conversation
OmarManzoor
reviewed
Jan 26, 2026
OmarManzoor
left a comment
Contributor
There was a problem hiding this comment.
Thank you for the PR @lorentzenchr. This generally looks good.
I added one suggestion to refactor the code. It might make the single elif condition more complex but it compresses basically the same code in both cases that differs only by pos_label
OmarManzoor
reviewed
Jan 26, 2026
OmarManzoor
approved these changes
Jan 30, 2026
OmarManzoor
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Thank you @lorentzenchr
Contributor
|
CC: @adrinjalali for a second review |
adrinjalali
reviewed
Feb 5, 2026
adrinjalali
left a comment
Member
There was a problem hiding this comment.
The solution seems quite hackey. I'm wondering if something like #33209 would be easier?
lorentzenchr
force-pushed
the
fix_scoring_labels_logisticregressioncv
branch
from
February 20, 2026 06:37
d45bdd5 to
96ebc84
Compare
Member
Author
|
@OmarManzoor Are you still on board with this simplified version? |
OmarManzoor
approved these changes
Feb 21, 2026
OmarManzoor
left a comment
Contributor
There was a problem hiding this comment.
Yes LGTM 👍. Lets merge
OmarManzoor
enabled auto-merge (squash)
February 21, 2026 11:36
tonybaloney
pushed a commit
to tonybaloney/swe-complex-scikit-learn
that referenced
this pull request
Mar 19, 2026
PR: scikit-learn#32828 Issue: scikit-learn#15389 Base commit: 21b6b37 Changed lines: 134
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #15389, follow-up of #32747.
What does this implement/fix? Explain your changes.
This PR enables
LogisticRegressionCVto correctly work when the CV folds do not contain all classes and thescoringargument is explicitly passed.Any other comments?
I don't like my own solution (too much code), but it seems to work.