FIX make roc_auc_score consistent with roc_curve with a single class#27412
Merged
OmarManzoor merged 26 commits intoscikit-learn:mainfrom Oct 13, 2024
Merged
FIX make roc_auc_score consistent with roc_curve with a single class#27412OmarManzoor merged 26 commits intoscikit-learn:mainfrom
roc_auc_score consistent with roc_curve with a single class#27412OmarManzoor merged 26 commits intoscikit-learn:mainfrom
Conversation
added UndefinedMetricWarning type
Contributor
Author
|
Will mark ready for review if #26176 is not going to be merged |
roc_auc_score consistent with roc_curve with a single class
glemaitre
reviewed
May 19, 2024
glemaitre
reviewed
May 19, 2024
Member
glemaitre
left a comment
There was a problem hiding this comment.
We will need an entry in the 1.6 changelog in metrics to acknowlege the change. I think we can consider it as a bug fix.
glemaitre
approved these changes
May 20, 2024
Contributor
Author
|
I can't resolve conflicts locally because pre-commit fails on Edit: resolved them on Github. |
Member
|
@OmarManzoor do you think that you can have a look at this PR? |
OmarManzoor
reviewed
Oct 11, 2024
Contributor
OmarManzoor
left a comment
There was a problem hiding this comment.
Thanks for the PR @glevv.
Minor comments otherwise looks good
sklearn/metrics/tests/test_common.py
Outdated
| metric(y1_row, y2_row) | ||
| if "roc_auc" in name: | ||
| # for consistency between the `roc_cuve` and `roc_auc_score` | ||
| # 0.0 is returned and and `UndefinedMetricWarning` is raised |
Contributor
There was a problem hiding this comment.
Suggested change
| # 0.0 is returned and and `UndefinedMetricWarning` is raised | |
| # 0.0 is returned and an `UndefinedMetricWarning` is raised |
OmarManzoor
reviewed
Oct 13, 2024
This was referenced Oct 15, 2024
3 tasks
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 #24381
closes #26176
See also #27047
What does this implement/fix? Explain your changes.
Any other comments?