What is the Matthews Correlation Coefficient (MCC) and when should you use it?
mediumAnswer
- MCC = (TP*TN - FP*FN) / sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN)) — the Pearson correlation coefficient between predicted and true binary labels.
- Range [-1, 1]: 1 perfect, 0 chance, -1 perfectly wrong.
- Its advantage over F1: symmetric in positive and negative classes (F1 ignores TN), so it's a fair single-number summary even on imbalanced data.
- Great for reporting binary classifier quality in one number.
Check yourself — multiple choice
- MCC is the same as accuracy
- It's the correlation between predicted and true labels — symmetric across classes and robust on imbalance
- MCC only works for regression
- MCC is always positive
MCC = Pearson correlation of predicted vs true; symmetric across classes ⇒ great on imbalance.
#metrics#classification#imbalance
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- Why is accuracy a bad primary metric for many real-world problems?
- What is Cohen's kappa and why is it useful?
- What is balanced accuracy?
- What is the geometric mean (G-mean) in classification metrics?
- What are the main pitfalls of relying on ROC-AUC?
- How do you select the decision threshold for a binary classifier?