Confusion Matrix
A confusion matrix helps to illustrate what kinds of errors a classification model is making.
If you have a binary classifier model that distinguishes between a positive and a negative class, you can define the following 4 values depending on the actual vs predicted class.
Confusion matrix
The resulting matrix has 4 fields known as:
- True Positives (TP)
- True Negatives (TN)
- False Positives (FP),
- False Negatives (FN)
Different combinations of these fields result in a number of key metrics, including: accuracy, precision, recall, specificity and f1 score.
The confusion matrix is a compact but very informative representation of how your classification model is performing. It is the go to tool for evaluating classification models.