[MRG] Simplify addition of point (0, 0) in roc_curve#13523
Merged
adrinjalali merged 2 commits intoscikit-learn:masterfrom Mar 28, 2019
Merged
[MRG] Simplify addition of point (0, 0) in roc_curve#13523adrinjalali merged 2 commits intoscikit-learn:masterfrom
adrinjalali merged 2 commits intoscikit-learn:masterfrom
Conversation
adrinjalali
reviewed
Mar 27, 2019
sklearn/metrics/ranking.py
Outdated
| tps = np.r_[0, tps] | ||
| fps = np.r_[0, fps] | ||
| thresholds = np.r_[thresholds[0] + 1, thresholds] | ||
| # Add an extra threshold position if necessary |
Member
There was a problem hiding this comment.
I guess then remove the "if necessary" part?
Contributor
Author
There was a problem hiding this comment.
That's right, thanks ! Done
xhluca
pushed a commit
to xhluca/scikit-learn
that referenced
this pull request
Apr 28, 2019
* first commit * remove "if necessary"
xhluca
pushed a commit
to xhluca/scikit-learn
that referenced
this pull request
Apr 28, 2019
…arn#13523)" This reverts commit 3c8bdf1.
xhluca
pushed a commit
to xhluca/scikit-learn
that referenced
this pull request
Apr 28, 2019
…arn#13523)" This reverts commit 3c8bdf1.
koenvandevelde
pushed a commit
to koenvandevelde/scikit-learn
that referenced
this pull request
Jul 12, 2019
* first commit * remove "if necessary"
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.
After the modification of #10093, I think we can simplify the code because it's forced that we pass in one of the case tested by the "if":
tps.size == 0then we pass in ittpsand one element infps(tpsandfpshave the same size)Then the first point is the first classified positive so it's either a true positive or a false positive. So I think we should pass in the "if" statement in any case