Phase 3 · Machine learning · Evaluation
Precision, recall and F1
Accuracy lies; these don't.
Open this lesson Create a free account
Why it matters
Most things worth predicting are rare: churners, fraud, qualified leads, the one support ticket that's a legal threat. On rare classes, accuracy rewards a model that never finds any of them. Precision and recall measure what you care about: of the customers you flagged, how many were real, and of the real ones, how many you found. They're also how you'll score any LLM-based classifier you build, from intent routing to content moderation.
What you'll be able to do
- Explain why accuracy misleads when one class is rare
- Compute precision, recall and F1 from a confusion matrix
- Trade precision against recall by moving the decision threshold
- Choose a threshold from the business cost of each kind of mistake
Before this lesson
Next in this phase: ROC curves and AUC