Repository navigation
TST Add test for multiclass input format invariance, fix average_precision_error - #34083
Merged
Merged
Conversation
lucyleeow
commented
May 22, 2026
| 0.77 | ||
| """ | ||
| xp, _, device = get_namespace_and_device(y_score) | ||
| y_score = check_array(y_score, ensure_2d=False) |
Member
Author
There was a problem hiding this comment.
Looking at other metrics, this was the standard way to ensure lists/other array types are converted to numpy arrays.
Comment on lines
+338
to
+342
| "label_ranking_loss", | ||
| "label_ranking_average_precision_score", | ||
| "dcg_score", | ||
| "ndcg_score", | ||
| "coverage_error", |
Member
Author
There was a problem hiding this comment.
None of these accept multiclass inputs - they generally deal with ranking and multilabel (not multiclass)
Member
Author
|
Actually I should probably add a changelog here |
ogrisel
approved these changes
May 22, 2026
Member
|
Feel free to merge with a changelog entry. |
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
ref: #32909 (comment)
What does this implement/fix? Explain your changes.
average_precision_scoreto accept listAI usage disclosure
I used AI assistance for:
Any other comments?
cc @StefanieSenger