1. Metrics encode priorities
For classification, accuracy answers “what fraction were correct?” Precision asks “when we predicted positive, how often were we right?” Recall asks “of all true positives, how many did we find?”
The harmonic mean combines precision and recall:
But F1 is not automatically the best metric; it silently weights precision and recall in a particular way.
2. ROC and PR curves
A single threshold hides model behaviour. Curves sweep many thresholds.
ROC plots true-positive rate against false-positive rate. Precision–Recall curves are often more revealing for rare positive classes because they focus attention on positive predictions.
3. Regression metrics
Mean absolute error:
Root mean squared error:
RMSE punishes large errors more strongly. compares squared error against predicting the target mean, but can be misinterpreted if used without context.
4. Always connect metric to consequence
A 5-minute ETA error and a $500,000 price error are not equivalent merely because both are “one error.” Business or scientific costs should guide the metric and threshold.
What to Remember
There is no universally best metric. A metric is a mathematical statement about which mistakes matter.
Next → Calibration and Uncertainty: even if a model ranks examples correctly, do its reported probabilities mean what they claim?