8000 [WIP] BUG Removes warning in matthews_corrcoef when dividing by zero by thomasjpfan · Pull Request #16932 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[WIP] BUG Removes warning in matthews_corrcoef when dividing by zero #16932

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

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Fixes #16924

What does this implement/fix? Explain your changes.

This is consistent with the wikipedia on the matthews correlation coefficient:

If any of the four sums in the denominator is zero, the denominator can be arbitrarily set to one; this results in a Matthews correlation coefficient of zero, which can be shown to be the correct limiting value.

@thomasjpfan thomasjpfan changed the title BUG Removes warning in matthews_corrcoef when dividing by zero [WIP] BUG Removes warning in matthews_corrcoef when dividing by zero Apr 15, 2020
@thomasjpfan
Copy link
Member Author

We may need to decide what the expected outcome of this is. There are tests that asserts that the warning gets raised, which was added here.

@thomasjpfan thomasjpfan marked this pull request as draft April 21, 2020 01:02
@thomasjpfan thomasjpfan closed this Oct 1, 2020
@jnothman
Copy link
Member

I think we should not give that warning, even if we give one similar to the one in precision etc

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.

Matthews correlation coefficient metric throws misleading division by zero RuntimeWarning
2 participants
0