Precision vs recall vs F1: start with the confusion matrix
The fastest way to stop mixing up precision and recall is to anchor both metrics to the errors in the confusion matrix.
The four outcomes
True positive (TP) means the model predicted positive and was correct. False positive (FP) means the model predicted positive but was wrong. False negative (FN) means the model predicted negative but missed a positive case. True negative (TN) means the model predicted negative and was correct.
Precision asks: when the model says positive, how often is it right?
High precision means positive predictions contain relatively few false alarms. This can matter when acting on a positive prediction is expensive or disruptive.
Recall asks: of the real positives, how many did we catch?
High recall means the model misses relatively few positive cases. This matters when false negatives are especially costly.
F1 balances the two
F1 is the harmonic mean of precision and recall. It becomes low when either component is low, which makes it useful when you want a single score that penalizes imbalance between the two.
Why accuracy is not enough
Accuracy can look excellent when one class dominates the dataset. A classifier that rarely predicts the minority class can still be correct most of the time if negatives are overwhelmingly common.
Use the calculator
Try the ML Metrics Calculator with different confusion matrices and watch how each metric reacts to changing FP and FN counts.
A practical decision rule
Choose the metric that matches the error you care about. If false positives are painful, scrutinize precision. If missed positives are painful, scrutinize recall. If both matter and you want one summary value, F1 is a reasonable starting point. For real systems, report the confusion matrix and class distribution too.