Lesson 10 of 11
Picking the right metric
In plain words: The metric should match what a mistake costs in real life.
- Classification: precision when false alarms are costly, recall when misses are costly, F1 score for a balance.
- Imbalanced classes: avoid plain Accuracy; use ROC-AUC or F1.
- Numbers: MAE is easy to explain; RMSE punishes big misses.
- Forecasts: MAPE or MAE with backtesting.
- Chatbots / RAG: answer correctness and groundedness on a golden set.
Tip Always report your metric next to the baseline’s, so people can see the improvement.
See it in a real project
- How to build a spam filter, start to finish: precision, recall and the spam threshold
- How to sort customer reviews by sentiment: macro F1, so the rare classes count
- How to detect fraudulent transactions: average precision, and a threshold set by what fraud costs
- How to predict house prices: MAE in dollars and the median error in percent
- How to route support tickets to the right team: how many tickets route themselves, and how many of those are right
- How to forecast call volume and plan staffing: WAPE, and staffing to a busier-than-average forecast
- How to flag unusual expense claims: how many known problems land in the review list
- How to find defective products in photos: a threshold chosen from what a missed defect costs
- How to forecast daily sales for each store: WAPE against a seasonal naive forecast
- How to recommend products your customers will like: the hit rate, and why only an A/B test proves value
- How to spot failing machines from sensor data: failures caught and false alarms a day, within an alert budget
- How to predict delivery times: MAE in minutes, and a window met 9 times out of 10
- How to predict customer lifetime value: MAE in dollars, and the revenue held by the top 10%
- How to build a support chatbot from your help center: how often search finds the right article, and a threshold for handing over
- How to sort product photos into categories: a confusion matrix, and a confidence for filing photos automatically
- How to predict which employees might leave: ROC-AUC, a top 10% list, and checking the chances against what happened
- How to forecast inventory demand and set reorder points: fill rate and stock held, from a day-by-day replay