The four cells that explain everything
True positives (TP), false positives (FP), true negatives (TN), and false negatives (FN). Every classification metric is a ratio of these four numbers. If you internalize the four cells, you can derive precision, recall, F1, and accuracy on the whiteboard without looking them up.
Definitions worth memorizing
- Precision = TP / (TP + FP) — of the ones we predicted positive, how many were right?
- Recall = TP / (TP + FN) — of the actual positives, how many did we catch?
- F1 = harmonic mean of precision and recall.
- Accuracy = (TP + TN) / total — useful only when classes are balanced.
Read the matrix before you read the metric
Always print the confusion matrix and a per-class report before reporting any single number. The four cells often reveal that your "95% accuracy" model never predicts the minority class.