AI engineering glossary · Evaluation metrics

What is MCC (matthews correlation coefficient)?

Matthews correlation coefficient (also called MCC, phi coefficient): A single score for binary classification that uses all four confusion-matrix cells: (TP*TN - FP*FN) / sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN)). It ranges from -1 to +1, where 0 means no better than chance. It stays informative on imbalanced data where accuracy and F1 can mislead.

Level: advancedTopic: Evaluation metrics

Matthews correlation coefficient: an example

For TP = 15, FN = 5, FP = 10, TN = 970 the score is 14,500 / sqrt(25 * 20 * 980 * 975), about 0.66.

Related terms

More Evaluation metrics terms

Where you learn it

Matthews correlation coefficient is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.