BinaryMatthewsCorrCoef outputs 0 if target and prediction contains only one case either positive or negative case #1810
Unanswered
lokesh1199
asked this question in
Classification
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
When the given target and pred contains only one case either positive or negative (case - 1), The output of BinaryMatthewsCorrCoef is always 0. But we can clearly say that predictions are same as the targets. And for the case - 2, If the preds and targets are completely different, the MCC is also zero. Is this expected behaviour with MCC or some other issue.
In this blog, They are handling these cases slightly different. Below are the MCC values using their implementation. These values represent model performance more accurately than the torchmetrics version.
case - 1 -> MCC = 1.0
case - 2 -> MCC = -1.0
Kindly tell if this should be handled differently?
Beta Was this translation helpful? Give feedback.
All reactions