Confusion matrix
A confusion matrix is a table used in Machine learning and statistical verification to evaluate the performance of a predictive model. It displays how often a classifier correctly or incorrectly predicted outcomes by organizing results into four categories: true positives, true negatives, false positives, and false negatives.
The matrix reveals not just overall accuracy, but the nature of errors—whether a model tends to over-predict one class or under-predict another. This granularity makes it invaluable for domains where different kinds of mistakes carry different costs: a medical diagnostic system might tolerate false negatives (missed cases) differently than false positives (unnecessary alarms).
From a confusion matrix, practitioners derive deeper logical metrics: Precision, Recall, Specificity, and F1 Score, each answering distinct questions about model reliability. The matrix thus transforms raw predictions into actionable insight.
The term reflects how easily models can become "confused" between categories—a humble acknowledgment that imperfection is built into learning systems. Despite its unglamorous name, the confusion matrix remains fundamental to understanding whether a model actually works.
Related
Machine learning, Classification (statistics), Performance metric, Accuracy, Binary classification, Model evaluation