Feature request: please add Matthews Correlation Coefficient (MCC) to the Scorer node

Hi KNIME team and everyone,

I really like the Scorer node. It’s nice having Accuracy, F-measure, and all the TP/FP/TN/FN counts in one spot. But I often find myself wanting the Matthews Correlation Coefficient (MCC) too, since it’s a more balanced and meaningful metric for binary classification, especially when classes are imbalanced.

Right now, I need to manually plug the confusion matrix values into a Math Formula node and compute MCC myself. It works, but it feels a bit awkward and adds extra steps. It would be awesome if MCC was included right inside the Scorer node output, alongside Accuracy and F-measure.

The reason I care about MCC is because it takes into account all parts of the confusion matrix and gives a more reliable sense of how good your model really is. It’s better than just Accuracy or F1 in many cases. A paper by Chicco and Jurman (2020) called The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation (BMC Genomics 21:6) explains this really well.

Thanks for thinking about this. I think having MCC built-in would save time and encourage people to use a better metric, especially when dealing with imbalanced data.

Cheers,
Gio

Moved to Feedback & Ideas so that people can vote for this feature request :slight_smile:

Perfect. Thank you @ScottF!

1 Like

This is really interesting! Thanks for pointing out

As a solution till its implemented we can use scikitlearn package in python nodes

1 Like

Thank you for your interest, Andi!
Yes, the workaround is straightforward but I think having it directly in the node can also encourage people to use it.
Moreover, I think it would be easy to implement it in the Scorer node as it already calculates all the needed components (TP, TN, FP and FP).

1 Like