Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Foundsheep
Copy link

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 called average, and it is documented to be binary by default. However, it is actually coded to be None, 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

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

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 40502b3. Link to the linter CI: here

average=None,
average="binary",
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants