Skip to content
atlas

Precision

Also known as: positive predictive value

Of all the cases a model flags as positive, the share that really are; in security terms, how many alerts were real.

Draft - this entry has not been reviewed yet.

Formal

The number of true positives divided by all cases the model marked positive (true positives plus false positives), taken from a confusion matrix for one class.

In plain English

Like a mushroom picker whose basket holds only good mushrooms; every one they chose was safe, even if they walked past plenty of others.

In practice

At a small engineering firm, the office manager who looks after IT sees the phishing filter hold back 200 emails in a month; 180 really are phishing, so its precision is 90%, and she releases the other 20 by hand.

Why it matters

Low precision buries staff in wrong alerts and teaches them to ignore the tool, so it is the number to raise when the cost of a wrong flag is high.

Technical deep dive

Precision, or positive predictive value, is TP / (TP + FP): conditional on the model saying "positive", the probability that it is right. It is undefined when the model makes no positive predictions, a case scikit-learn handles with its zero_division parameter. False negatives do not enter the formula at all, so a model that flags only its single most certain case can score 100% precision while missing nearly everything; precision is meaningless without recall or a fixed operating point beside it. In ranking and retrieval it is usually reported at a cut-off, precision@k, and averaged over recall levels as average precision (AP); object detection reports mean AP over classes, with COCO additionally averaging over intersection-over-union thresholds from 0.5 to 0.95.

Unlike recall, precision depends directly on prevalence. By Bayes' rule, PPV = (sensitivity × prevalence) / (sensitivity × prevalence + (1 − specificity) × (1 − prevalence)). A detector with 99% sensitivity and 99% specificity applied where only 0.1% of events are malicious has a precision of about 9%: roughly ten false alarms for every true one. This base-rate effect is the arithmetic behind alert fatigue in security operations and false-positive screening results in medicine, and it means precision measured on a balanced or enriched test set overstates what will be seen in production unless it is reweighted to the real class mix.

Precision is controlled through the decision threshold. Raising the threshold typically raises precision, but not strictly monotonically (it can dip when a few high-scoring negatives remain), whereas recall can only stay the same or fall. The precision-recall curve traces this trade-off; under heavy class imbalance it is more informative than the ROC curve, because the false positive rate stays deceptively small when negatives vastly outnumber positives (Davis & Goadrich, 2006; Saito & Rehmsmeier, 2015). Operational requirements are therefore often phrased as "maximum recall subject to precision of at least X".

The word collides with other meanings. In metrology (ISO 5725) precision means the closeness of repeated measurements to each other, a property of variance rather than of correctness; in numerics it refers to floating-point formats such as FP16 or BF16 used for model weights. In retrieval-augmented generation, "context precision" measures how much of the retrieved material is relevant, a retrieval metric distinct from the precision of the final answer.

What to learn first

Everything this builds on, foundations first.

  1. Classification
  2. →Label
  3. →Training data
  4. →Metrics
  5. →Supervised learning
  6. →Alerting
  7. →Confusion matrix
  8. →False positive
  9. →Precision

Relationships

Unlocks
F1 score
Don't confuse with
Recall
Used with
Alert triage

Sources & further reading

Reference works

Where this data comes from

This entry was drafted by an AI from the sources above and has not yet been checked by a person. Treat it as a starting point, and check anything important against the sources.

See the review queueSuggest a correction on GitHubThis term as JSON

Mentioned in

Check yourself

Loading…

Atlas is in beta.