IA 360
Artificial Intelligence Glossary

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.

Admin IA360 4 min read AI-generated Leer en español
Precision

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 are the true positives (hits) and FP the false positives (false alarms). It answers the question: of everything the model flagged, how much did it get right?

The confusion matrix

Precision is read in the confusion matrix, which crosses what is predicted with what is real in four cells: true positives (TP), false positives (FP), true negatives (TN) and false negatives (FN). Precision focuses on the column of what the model declared positive, and penalizes false positives.

Precision is not the same as accuracy

A frequent mistake is to confuse precision with accuracy, which is the proportion of total hits, (TP + TN) over all cases. Accuracy can be misleading with imbalanced classes: if only 1% of cases are positive, a model that always says “negative” is right 99% of the time while being useless. Precision does not fall into that trap, because it focuses on the quality of the positive predictions.

Precision versus recall

Precision is the flip side of recall (TP / (TP + FN)): precision penalizes false positives; recall, false negatives. And they are usually in tension: raising the threshold so the model only flags what it is very sure of improves precision, but lets positives slip and lowers recall. The F1 score, the harmonic mean of the two, sums up that balance in a single number.

When to prioritize precision

A high precision matters when a false positive is costly. The classic example is the spam filter: marking a legitimate email—a job offer, a message from a client—as junk is more harmful than letting some spam through, so precision is prioritized. In information retrieval one also speaks of precision—the fraction of retrieved results that are relevant—and of precision@k, which measures it only among the first k results.

This article was produced with artificial intelligence under human editorial oversight.

Share this article

This website uses cookies to improve the browsing experience. Cookie policy.

↑↓ navigate ↵ open esc close