[MRG] Ensure that ROC curve starts at (0, 0)#10093
Merged
jnothman merged 4 commits intoscikit-learn:masterfrom Nov 10, 2017
qinhanmin2014:roc_curve
Merged
[MRG] Ensure that ROC curve starts at (0, 0)#10093jnothman merged 4 commits intoscikit-learn:masterfrom qinhanmin2014:roc_curve
jnothman merged 4 commits intoscikit-learn:masterfrom
qinhanmin2014:roc_curve
Conversation
Member
|
Looks good at a glance. Please add to what's new. Can this change affect the auc? If so, document carefully. Also, perhaps add that reference on roc analysis to the docs |
Member
Author
|
@jnothman Thanks a lot for the instant review :) |
Contributor
|
LGTM |
jnothman
approved these changes
Nov 9, 2017
| non-integer sample weights. :issue:`9786` by :user:`Hanmin Qin <qinhanmin2014>`. | ||
|
|
||
| - Fixed a bug where :func:`metrics.roc_curve` sometimes starts on y-axis instead | ||
| of (0, 0), which is inconsistent with the document and other implementations. |
Member
There was a problem hiding this comment.
Note that this does not affect auc
Member
Author
|
@jnothman Thanks. Comment addressed. |
Member
|
I don't think this is controversial: I'll take Joan's +1 on this... Let's merge. Thanks! |
maskani-moh
pushed a commit
to maskani-moh/scikit-learn
that referenced
this pull request
Nov 15, 2017
jwjohnson314
pushed a commit
to jwjohnson314/scikit-learn
that referenced
this pull request
Dec 18, 2017
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 #9790
See also #9850
What does this implement/fix? Explain your changes.
Currently, when the first point of ROC curve is on y-axis, we don't add a point (0, 0), which is not consistent with doc & some papers & some R packages.
Reference:
(1)scikit-learn doc
thresholds : array, shape = [n_thresholds]
Decreasing thresholds on the decision function used to compute fpr and tpr. thresholds[0] represents no instances being predicted and is arbitrarily set to max(y_score) + 1.
(2)@jnothman's comment
our concern should be that in all cases, the curve includes a point that represents predicting nothing in the positive class, and that every further point represents predicting more than nothing, for every threshold at which this changes the fpr or tpr, until all are predicted.
(3)An introduction to ROC analysis cite >7000 link
(4)R package ROCR
Any other comments?