[MRG] Use defined notation for precision and recall#12726
Merged
qinhanmin2014 merged 2 commits intoscikit-learn:masterfrom Dec 6, 2018
Merged
[MRG] Use defined notation for precision and recall#12726qinhanmin2014 merged 2 commits intoscikit-learn:masterfrom
qinhanmin2014 merged 2 commits intoscikit-learn:masterfrom
Conversation
added 2 commits
December 5, 2018 14:03
Replace undefined "`A`" and "`B`" in definitions of precision, recall, and F-beta with defined symbols "`y_l`" and "`\hat{y}_l`" and correct the resulting definitions.
I missed that the definitions use `\hat{y}` for true labels and `y` for predicted labels, so I had precision and recall reversed.
jnothman
reviewed
Dec 9, 2018
Member
jnothman
left a comment
There was a problem hiding this comment.
I disagree, and would like to see this reverted.
Those definitions of P and R are generic functions applied to generic sets. I don't mind them being y and \hat{y} but using _l is in direct contradiction to what is described below in regards to different averaging.
Please do raise issues with respect to other errors in the documentation here.
qinhanmin2014
pushed a commit
that referenced
this pull request
Dec 9, 2018
adrinjalali
pushed a commit
to adrinjalali/scikit-learn
that referenced
this pull request
Jan 7, 2019
adrinjalali
pushed a commit
to adrinjalali/scikit-learn
that referenced
this pull request
Jan 7, 2019
xhluca
pushed a commit
to xhluca/scikit-learn
that referenced
this pull request
Apr 28, 2019
xhluca
pushed a commit
to xhluca/scikit-learn
that referenced
this pull request
Apr 28, 2019
xhluca
pushed a commit
to xhluca/scikit-learn
that referenced
this pull request
Apr 28, 2019
xhluca
pushed a commit
to xhluca/scikit-learn
that referenced
this pull request
Apr 28, 2019
koenvandevelde
pushed a commit
to koenvandevelde/scikit-learn
that referenced
this pull request
Jul 12, 2019
koenvandevelde
pushed a commit
to koenvandevelde/scikit-learn
that referenced
this pull request
Jul 12, 2019
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.
Replace undefined symbols
AandBin the definitions of precision, recall, and F-beta with defined symbolsy_land\hat{y}_l.Reference Issues/PRs
NA
What does this implement/fix? Explain your changes.
The user guide on model evaluation defines precision and recall in terms of
AandBwithout defining those symbols. There does seem to be a convention in the Information Retrieval literature of usingArefer to relevant document (analogous to positive samples) andBto refer to retrieved documents (analogous to positive predictions). We already have defined symbols for those concepts, namely\hat{y}_landy_l, respectively, wherelis the "positive" class label. When I replaceAwith\hat{y}_landBwithy_l, then the resulting definitions of precision and recall are reversed, so I correct that issue in addition to the simple find-and-replace operation.Any other comments?
The more I look at this section of the document, the more apparent problems I find. I think this PR fixes one of them.