[API, MAINT] Deprecate usage of y_prob and probas_pred in sklearn.metrics#28092
Merged
thomasjpfan merged 29 commits intoscikit-learn:mainfrom Feb 16, 2024
Merged
[API, MAINT] Deprecate usage of y_prob and probas_pred in sklearn.metrics#28092thomasjpfan merged 29 commits intoscikit-learn:mainfrom
y_prob and probas_pred in sklearn.metrics#28092thomasjpfan merged 29 commits intoscikit-learn:mainfrom
Conversation
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
adrinjalali
reviewed
Jan 25, 2024
Member
adrinjalali
left a comment
There was a problem hiding this comment.
All versions need to be bumped by 1
Otherwise LGTM.
sklearn/metrics/_classification.py
Outdated
Comment on lines
+3137
to
+3140
| "y_proba": ["array-like", None], | ||
| "sample_weight": ["array-like", None], | ||
| "pos_label": [Real, str, "boolean", None], | ||
| "y_prob": ["array-like", StrOptions({"deprecated"})], |
Member
There was a problem hiding this comment.
None and "deprecated" both need to be a hidden option.
sklearn/metrics/_ranking.py
Outdated
Comment on lines
+868
to
+874
| "y_score": ["array-like", None], | ||
| "pos_label": [Real, str, "boolean", None], | ||
| "sample_weight": ["array-like", None], | ||
| "drop_intermediate": ["boolean"], | ||
| "probas_pred": [ | ||
| "array-like", | ||
| StrOptions({"deprecated"}), |
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
adam2392
commented
Jan 25, 2024
Member
Author
adam2392
left a comment
There was a problem hiding this comment.
Addressed your comments. Thanks @adrinjalali !
sklearn/metrics/_classification.py
Outdated
Comment on lines
+3137
to
+3140
| "y_proba": ["array-like", None], | ||
| "sample_weight": ["array-like", None], | ||
| "pos_label": [Real, str, "boolean", None], | ||
| "y_prob": ["array-like", StrOptions({"deprecated"})], |
sklearn/metrics/_ranking.py
Outdated
Comment on lines
+868
to
+874
| "y_score": ["array-like", None], | ||
| "pos_label": [Real, str, "boolean", None], | ||
| "sample_weight": ["array-like", None], | ||
| "drop_intermediate": ["boolean"], | ||
| "probas_pred": [ | ||
| "array-like", | ||
| StrOptions({"deprecated"}), |
Signed-off-by: Adam Li <adam2392@gmail.com>
Member
|
@glemaitre this should be a quick review. |
thomasjpfan
reviewed
Feb 16, 2024
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you for the PR @adam2392 !
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Member
Author
|
Thank you for the review! |
Signed-off-by: Adam Li <adam2392@gmail.com>
Member
|
The CI failures look related. |
Signed-off-by: Adam Li <adam2392@gmail.com>
Member
Author
Ah yes. The check needed to handle various edge cases properly since the variable can be an array, or a string. It should be fixed hopefully now... |
Signed-off-by: Adam Li <adam2392@gmail.com>
Signed-off-by: Adam Li <adam2392@gmail.com>
thomasjpfan
approved these changes
Feb 16, 2024
2 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: #27994
What does this implement/fix? Explain your changes.
Consolidates usage of
y_scoreory_proba.Any other comments?