-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Fix default value of average in precision_recall_fscore_support #31270
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
base: main
Are you sure you want to change the base?
Conversation
The original aim might be the opposite to this commit, leaving it as it was(None), and changing the documentation. However, the fact that the original documentation explicitly mentions 'binary' for that value led me to make this decision
average=None, | ||
average="binary", |
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 think the documentation should follow the code, not the other way around. Changing this would change existing code behavior.
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.
Changed the documentation instead, and returned the code
The original aim might be the opposite to this commit, leaving it as it was(None), and changing the documentation. However, the fact that the original documentation explicitly mentions 'binary' for that value led me to make this decision
40502b3
to
3ff208f
Compare
CI error is related. Also, please avoid force pushing to your branch here, since it makes review harder. |
Sorry about that. I'm not familiar with PR that much. If I'm not pushing my branch, then how could I modify the code and update the PR? |
You push to your branch, but don't force push to the branch. Make sure you merge with If you look at the failing CI, you see this message:
That's a test which makes sure things are consistently documented. In this case, you need to check if the other functions also need a change, or if only this one needs a change and instead the test needs to be fixed. |
Thanks for the detailed guide, but I still need some more help.
|
It seems that the other related functions set default What do you think about this difference in default values @adrinjalali ? Note 'binary' gives you the values for the |
hmm, not sure. I wouldn't mind changing the default via a deprecation cycle to make them all consistent.
Just make sure you do And the error is in this CI run: https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=76333&view=logs&j=f71949a9-f9d9-549e-cf45-2e99c7b412d1&t=d5baef2b-8bda-5a4c-e848-157b5caff279 |
I was thinking the same. Maybe cc @glemaitre or @lorentzenchr may be interested to weigh in? |
Reference Issues/PRs
None. This is a very trivial issue
What does this implement/fix? Explain your changes.
precision_recall_fscore_support
has a parameter calledaverage
, and it is documented to bebinary
by default. However, it is actually coded to beNone
, and this mismatch causes an unexpected behaviour.Any other comments?
The original aim might be the opposite to this commit, leaving it as it was(
None
), and changing the documentation. However, the fact that the original documentation explicitly mentions'binary'
for that value led me to make this decision