difficulty 1/5
Precision
Of everything the model flagged as positive, the fraction that really was positive — the measure of how much you can trust a positive prediction.
Intuition
The model raised an alarm. Should you believe it?
Precision answers exactly that and nothing else. It looks only at the predictions the model called positive and asks what fraction of them were right. Cases the model never flagged do not enter the calculation at all — which is what makes it a statement about the reliability of an alert, not about coverage.
Formal definition
How it works
Where it's used
Why & when
Worked example
Pitfalls
Check yourself
3 questions
The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.
On the cheat sheet: Classification metrics →
Sources
- scikit-learn — sklearn.metrics.precision_scoredocs · retrieved 2026-08-30https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_score.html
- Machine Learning Crash Course — Classification: accuracy, recall, precision, and related metricscourse · retrieved 2026-10-06https://developers.google.com/machine-learning/crash-course/classification/accuracy-precision-recall
- Introduction to Information Retrieval (2008)bookhttps://nlp.stanford.edu/IR-book/html/htmledition/irbook.html