Glossary term
Glossary term
Foundations
An NxN table that summarizes the number of correct and incorrect predictions that a classification model made. For example, consider the following confusion matrix for a binary classification model:
The preceding confusion matrix shows the following:
Of the 19 predictions in which ground truth was Tumor, the model correctly classified 18 and incorrectly classified 1.
Of the 458 predictions in which ground truth was Non-Tumor, the model correctly classified 452 and incorrectly classified 6.
The confusion matrix for a multi-class classification problem can help you identify patterns of mistakes. For example, consider the following confusion matrix for a 3-class multi-class classification model that categorizes three different iris types (Virginica, Versicolor, and Setosa). When the ground truth was Virginica, the confusion matrix shows that the model was far more likely to mistakenly predict Versicolor than Setosa:
As yet another example, a confusion matrix could reveal that a model trained to recognize handwritten digits tends to mistakenly predict 9 instead of 4, or mistakenly predict 1 instead of 7.
Confusion matrixes contain sufficient information to calculate a variety of performance metrics, including precision and recall.
Created for this library
A medical imaging team reviews the confusion matrix per disease class to spot which conditions are being mistaken for which others.
A fraud team studies the confusion matrix to decide whether to invest in reducing false positives or false negatives based on operational cost.
A churn team shares the confusion matrix with the retention call center so agents understand which segments the model labels incorrectly.
Definition source: Google for Developers Machine Learning Glossary | Creative Commons Attribution 4.0 License