TST add binary and multiclass test for scorers#18904
Merged
thomasjpfan merged 18 commits intoscikit-learn:mainfrom Jan 28, 2021
efiegel:binary-classification-tests
Merged
TST add binary and multiclass test for scorers#18904thomasjpfan merged 18 commits intoscikit-learn:mainfrom efiegel:binary-classification-tests
thomasjpfan merged 18 commits intoscikit-learn:mainfrom
efiegel:binary-classification-tests
Conversation
…orer in _scorer.py, only 'neg_log_loss'
…tic regression model
…tratified test_train_split to ensure train and tests sets capture all classes.
…ling due to unrelated things [doc skip].
…ling due to unrelated things [doc skip].
glemaitre
reviewed
Dec 19, 2020
Member
glemaitre
left a comment
There was a problem hiding this comment.
Sorry for the delay for reviewing. Some first thought regarding how to refactor the tests.
…fication_scores test to test_classificatio_binary_scores
…tion_binary_scores can be parameterized
glemaitre
reviewed
Jan 4, 2021
Member
glemaitre
left a comment
There was a problem hiding this comment.
It looks good. Only a couple of nitpicks.
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Member
|
ping @thomasjpfan |
thomasjpfan
reviewed
Jan 11, 2021
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you for the PR @efiegel !
This is a good step forward. In a follow up PR, we should come up with a way to keep these lists up to date.
…on-tests fetched updates from main
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
Resolves #12310 by adding more tests for multiclass classification tasks.
What does this implement/fix? Explain your changes.
Added tests for a multiclass DecisionTreeClassifier and LogisticRegression classifier on all scorers except binary-only scorers. Also removed log_loss from the list of CLF_SCORERS since there is no log_loss scorer in _scorer.py, only neg_log_loss.
Any other comments?
@amueller was this close to what you had in mind? This captures all new scorers added by @thomasjpfan in #12789.