Home › Glossary › Fundamentals › Precision & Recall

Beginner · Fundamentals

Precision & Recall

Visual diagram · (in preparation) · Math · Worked example · 3 difficulty levels.

TL;DR. Complementary metrics measuring classifier accuracy on positive predictions (precision) and ability to find all positives (recall).

Technical Definition

Complementary metrics measuring classifier accuracy on positive predictions (precision) and ability to find all positives (recall).

How it works

Precision = TP/(TP+FP), Recall = TP/(TP+FN). There's an inherent tradeoff. F1 score is their harmonic mean. In medical diagnosis, high recall is critical. In spam filtering, high precision matters.

Mathematical Notation

Precision = TP/(TP+FP)    Recall = TP/(TP+FN)    F1 = 2·P·R/(P+R)

TP = true positives, FP = false positives, FN = false negatives. F1 balances both metrics.

Related Concepts

  • Loss Function — A mathematical function that measures how far the model's predictions are from the actual values, guiding the learning process.
  • Bias-Variance Tradeoff — The tension between a model's ability to fit training data (low bias) and its ability to generalize to new data (low variance).
  • Cross-Validation — A technique that evaluates model performance by training and testing on different subsets of the data in rotation.