Confusion Matrix
The scorecard behind an accuracy number. A confusion matrix breaks a classifier's results into four cells so you see what kind of mistakes it makes.
- Term
- Confusion matrix
- Is
- Table of TP, FP, TN, FN for a classifier
- Cross-tabulates
- Predictions against actual labels
- Reveals
- What kind of errors a model makes
Parts of speech & senses
- A confusion matrix is a table that cross-tabulates a classifier's predictions against the truth, counting true positives, false positives, true negatives, and false negatives so you see exactly how the model errs. "The confusion matrix showed the model was missing every fraud case."
What a confusion matrix is
A confusion matrix is a small table that lays out how a classification model performed by comparing what it predicted against what was actually true. For a two-class problem it has four cells: true positives, cases the model correctly flagged as positive; true negatives, cases it correctly left as negative; false positives, negatives it wrongly flagged as positive (a false alarm, or Type I error); and false negatives, positives it wrongly missed (a Type II error). Read those four counts and you know not just how often the model was right, but exactly how it was wrong. The name comes from the way the table exposes where a model confuses one class for another. Almost every classification metric — accuracy, precision, recall, specificity — is just a ratio computed from these four numbers.
The reason the matrix matters is that a single accuracy figure hides the shape of the errors, and the shape is usually what you care about. Imagine a fraud model on data where only one in a thousand transactions is fraudulent. A model that flags nothing scores 99.9 percent accuracy and catches zero fraud — the confusion matrix would show it plainly, with every fraud sitting in the false-negative cell. The table forces you to weigh false positives against false negatives, which almost always carry different costs. Blocking a good customer (a false positive) is not the same as letting fraud through (a false negative). By separating the two, a confusion matrix turns a vague sense of how good a model is into a specific, cost-aware picture you can act on.
A confusion matrix versus an ROC curve
A confusion matrix is often discussed alongside the ROC curve, and the difference is threshold. A confusion matrix describes performance at one chosen decision threshold — the cutoff at which a predicted probability becomes a positive call. Move that threshold and the four cells change: a stricter cutoff cuts false positives but raises false negatives, and a looser one does the reverse. An ROC (receiver operating characteristic) curve captures that whole trade-off by plotting the true-positive rate against the false-positive rate across every possible threshold. So a confusion matrix is a snapshot at one operating point, while an ROC curve is the full sweep. You read the ROC curve, and its area under the curve, to compare models across thresholds. You read the confusion matrix to see what actually happens at the threshold you deploy.
That distinction has a practical upshot. The ROC curve, and metrics like AUC derived from it, help you judge a model's ranking ability independent of any particular cutoff — useful for comparing models. But you cannot deploy a curve; you have to pick a threshold and live with a specific confusion matrix. The matrix is where abstract performance meets real consequences: this many missed fraud cases, that many false alarms, at this setting. Precision-recall curves tell a similar story and are often preferred when positives are rare. The point is to use the ROC curve to choose and compare, then use the confusion matrix at your chosen threshold to understand and communicate the concrete errors you are signing up for.
Using a confusion matrix well
Read a confusion matrix whenever you evaluate a classifier — a lead-scoring model, a spam filter, a churn predictor. Start with the four cells before you trust any headline metric, and compute the ratios that fit your problem: precision when false positives are costly, recall when misses are costly, and a blended measure like the F1 score when you need balance. Set the decision threshold deliberately, guided by the real cost of each error type rather than a default of 0.5. Watch for class imbalance, where accuracy flatters a lazy model and the matrix exposes it. And check the matrix on fresh data, since a model that looked sharp in training can smear its predictions across the wrong cells in production.
The failures cluster around trusting a summary number. Teams celebrate high accuracy on imbalanced data without opening the matrix, and ship a model that never catches the rare thing it was built for. They fix the threshold at a thoughtless default and accept whichever error mix falls out. They optimize precision and ignore recall, or the reverse, without asking which error actually hurts. And they evaluate on the training data, so the matrix lies. The discipline is to treat the confusion matrix as the ground truth of a classifier's behavior — four honest counts of right and wrong by class — read the ratios that match your costs, choose the threshold on purpose, and never let one aggregate number stand in for the picture the four cells give you.
Synonyms & antonyms
Synonyms
Antonyms
Origin & history
Confusion matrix — a table cross-tabulating predicted against actual classes into true and false positives and negatives, long used in statistics and machine learning to describe classifier errors.
Etymology: source.
Usage trends
Search interest for this term over the last five years:
Common questions
- What is a confusion matrix?
- A confusion matrix is a table that compares a classifier's predictions with the truth, counting true positives, false positives, true negatives, and false negatives. Those four cells reveal not just how often a model is right but exactly what kinds of errors it makes.
- How is a confusion matrix different from an ROC curve?
- A confusion matrix shows performance at one decision threshold, so its four cells reflect a single operating point. An ROC curve plots the true-positive rate against the false-positive rate across all thresholds, capturing the whole trade-off rather than one snapshot.
- Why not just use accuracy?
- Accuracy hides the shape of the errors. On imbalanced data a model can score high accuracy while missing every rare case. The confusion matrix separates false positives from false negatives, which usually carry very different costs.
Resources & people to follow
- referenceRGM analysis — definitions, senses, and usage verified per term
Curated, non-competitor resources verified per term.
Related training
Disciplines
Areas of marketing where confusion matrix is a core concern: