Skip to content
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

autocorrect option for mcc #1

Closed
ulf1 opened this issue Dec 14, 2018 · 1 comment
Closed

autocorrect option for mcc #1

ulf1 opened this issue Dec 14, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@ulf1
Copy link
Member

ulf1 commented Dec 14, 2018

it's not really a bug but might cause trouble. If all predictions are TRUE or all are FALSE then mcc will return NaN. It's kind of the main advantage of using Matthews correlations that the program would crash in case a predictive model generates only FALSE or TRUE.

ToDo: Add an autocorrect option that would impute 0

def mcc(x, axis=0, autocorrect=False):
...
    cm = confusion(x[:, i], x[:, j])
    r[i, j] = confusion_to_mcc(cm)
    if autocorrect: r[i, j] = impute_zero(r[i, j])
    ...
@ulf1 ulf1 added the enhancement New feature or request label Dec 14, 2018
ulf1 added a commit that referenced this issue Mar 19, 2019
@ulf1
Copy link
Member Author

ulf1 commented Mar 19, 2019

481d01d

@ulf1 ulf1 closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant