Precision
Precision is a classification metric that measures what proportion of the cases a model flags as positive really are. We explain its formula, its place in the confusion matrix, why it should not be confused with accuracy, its tension with recall and when a high precision is worth prioritizing.
Precision is a classification metric that measures what proportion of the cases a model predicts as positive are really positive. Its formula is precision = TP / (TP + FP), where TP means true positives and FP false positives. The scikit-learn implementation documentation summarizes it as the ability not to label a negative example as positive. It answers a limited question: of everything marked positive, what fraction was correct?
The confusion matrix
Precision is read from the confusion matrix, which crosses predictions with reality: true positives, false positives, true negatives, and false negatives. It uses only the first two terms. It therefore does not reward a classifier for accumulating true negatives, but it also says nothing about how many real positives the system missed.
Before calculating it, one must specify which label counts as “positive.” For multiclass problems, the official documentation distinguishes calculating the metric per class from macro, micro, and weighted averaging. Two reports may both say “precision” yet produce different values if they do not state that choice.
Precision is not the same as accuracy
Accuracy divides all correct predictions—positive and negative—by all cases. Precision conditions the question on cases predicted as positive. The distinction matters with imbalanced classes: a large number of true negatives can make accuracy look attractive even when positive alerts work poorly.
Precision is not immune to imbalance either. Saito and Rehmsmeier showed that the baseline of a precision-recall curve equals the positive-class proportion, so it changes with prevalence. Powers also analyzes its dependence on prevalence and prediction bias. Model or population comparisons should therefore report the class distribution and confusion matrix as well.
Precision versus recall
Recall, TP / (TP + FN), asks what fraction of all real positives the system recovered. Raising a score threshold commonly accepts fewer cases: false positives may fall and precision rise, at the cost of missing positives and reducing recall. This is not a law binding every pair of models; the full curve displays the tradeoff available for that system and dataset. The study by Saito and Rehmsmeier explains why the curve is especially interpretable in imbalanced settings.
The F1 score is the harmonic mean of precision and recall, as stated in the official scikit-learn definition. It compresses both into one number, but it does not express the cost of each error or make populations with different prevalence comparable. Choosing F1 already assumes that a particular balance matters.
When to prioritize precision
High precision is valuable when acting on a false positive is costly: an alert triggers an intervention, blocks a transaction, or consumes scarce human review. The domain name alone does not decide the priority. An email filter with a quarantine folder has a different cost from a system that deletes messages; the consequence should be stated and the threshold chosen around it.
In information retrieval, precision is the fraction of retrieved items that are relevant. The official TREC documentation distinguishes this set measure from precision at cutoffs in a ranked list. “Precision@k” must therefore state k and the relevance criterion. The practical rule is to read every precision figure together with four facts: positive label, population, threshold, and averaging method.
Pieces using this term
- AI tops business priorities, according to a new study (2026-07-28)
- How to tell if a news outlet is citing a source or just invoking authority (2026-07-27)
- How to verify a chatbot claim before you use it (2026-07-26)
- We Asked Our Own March Piece for Its Sources. Here's What We Found (2026-07-26)
- Your Loyalty Card Isn't Just a Discount Anymore — It's How an AI Knows It's You (2026-07-26)
- An AI bubble? How to test Swisscanto’s thesis (2026-07-25)
- Memora organises agent memory without confusing recall with loading everything (2026-07-25)
- Agricultural AI: the data test it must pass before reaching the farm (2026-07-25)
This article was produced with artificial intelligence under human editorial oversight.