-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG + 1] Add example for precision_recall_fscore_support #4253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG + 1] Add example for precision_recall_fscore_support #4253
Conversation
The first example did not demonstrate average=None, it now does. The second example demonstrates that the values do not have to be integers, they can be strings, and it also demonstrates that the order of the results is determined by the labels argument.
... # doctest: +ELLIPSIS | ||
(array([ 0.66..., 0. , 0. ]), array([ 1., 0., 0.]), array([ 0.8, 0. , 0. ]), array([2, 2, 2])) | ||
|
||
Second example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just saying "You can also specify an order for labels, which could be strings" without a heading.
I think the first example is useful, not as certain about the second; it just gets very verbose and it's impossible to succinctly demonstrate every parameter or setting thereof. |
I fixed the issues. I decided to go with string labels rather than integer labels, because that was what caused my confusion in the first place, I did not understand what the integers meant and that their numerical value was not used, only their ordinal value. The strings are more intuitive. |
(array([ 0.66..., 0. , 0. ]), | ||
array([ 1., 0., 0.]), | ||
array([ 0.8, 0. , 0. ]), | ||
array([2, 2, 2])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would drop this example as the ordering of the result is implicit in that case.
LGTM. Not sure if this should go to the narrative or to the docstring, but I don't mind it there. |
LGTM. Thanks. Merging. I apologize for it taking so long to be included. |
[MRG + 1] Add example for precision_recall_fscore_support
The first example did not demonstrate
average=None
, it now does.The second example demonstrates that the values do not have to be
integers, they can be strings, and it also demonstrates that the order
of the results is determined by the
labels
argument.