8000 [MRG + 1] Add example for precision_recall_fscore_support by Flimm · Pull Request #4253 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged

Conversation

Flimm
Copy link
Contributor
@Flimm Flimm commented Feb 16, 2015

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.

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
Copy link
Member

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.

@jnothman
Copy link
Member

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.

@Flimm
Copy link
Contributor Author
Flimm commented Feb 18, 2015

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]))
Copy link
Member

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.

@amueller
Copy link
Member
amueller commented Apr 1, 2015

LGTM. Not sure if this should go to the narrative or to the docstring, but I don't mind it there.

@amueller amueller changed the title Add example for precision_recall_fscore_support [MRG + 1] Add example for precision_recall_fscore_support Apr 1, 2015
@GaelVaroquaux
Copy link
Member

LGTM. Thanks. Merging. I apologize for it taking so long to be included.

GaelVaroquaux added a commit that referenced this pull request Aug 30, 2015
[MRG + 1] Add example for precision_recall_fscore_support
@GaelVaroquaux GaelVaroquaux merged commit 7ce32d7 into scikit-learn:master Aug 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0