Label the axes before you count
Take a fictional system deciding whether a support message needs follow-up. Use actual labels as rows and predicted labels as columns. Treat Needs follow-up as the positive class. Put each message in exactly one cell. Some tools arrange axes differently, so check their labels before interpreting the numbers.
Build the table with ten examples
Suppose four messages actually need follow-up. The system catches three and misses one. Of the six messages that do not need follow-up, it incorrectly flags two and correctly leaves four alone. Your counts are three true positives, one false negative, two false positives and four true negatives. Add the cells to confirm you accounted for all ten messages.
| Actual label | Predicted follow-up | Predicted no follow-up |
|---|---|---|
| Follow-up | 3 | 1 |
| No follow-up | 2 | 4 |
Calculate precision and recall
Precision asks how many flagged messages truly needed follow-up. Three out of five gives 60%. Recall asks how many of the actual follow-up messages were caught. Three out of four gives 75%. Accuracy counts correct results across both classes. Seven of ten gives 70%. Write the numerator and denominator beside each percentage to make it easier to audit.
Change two decisions and compare
Imagine the system now flags the one message it missed and also flags one previously correct negative. True positives become four and false positives become three. Precision becomes four out of seven, about 57%. Recall becomes four out of four. Accuracy stays at seven out of ten because one decision improves and another worsens. Consider which kind of error the support team can handle more easily.
Try a small exercise
Draw a fresh table for a classifier with twelve cases. Create two false negatives and one false positive. Fill the rest with five true positives and four true negatives. Calculate precision, recall and accuracy. Then explain to someone else what a false negative would mean in your example. If a metric has no examples in its denominator, note that it is undefined for that dataset.
Related guides
Further reading. scikit-learn’s confusion matrix documentation.
