Metrics reference

What does each score tell you? Explore simple explanations and examples from medicine, driving, fraud detection, and more.

Help me choose a metric

Choose by the decision you need to make: finding problems, reducing false alarms, keeping a review queue manageable, or trusting a predicted chance.

You do not want to miss a problem

Use recall to see how many real problems you catch. FNR tells you how many you miss.

Examples: finding an illness in a medical test, or spotting a pedestrian in front of a car. Check false alarms too, and test situations such as night or rain separately. Medical example · AEB example

You want fewer false alarms

Use precision to check how many alerts are real. FPR tells you how often normal cases get flagged.

Examples: keeping legitimate emails out of spam, avoiding wrong fraud blocks, or reducing unnecessary car warnings. Check that you still catch enough real problems. Automatic-blocking example

You want one overall score

Use accuracy for a simple count of correct predictions. If one class is much rarer, also check balanced accuracy or MCC.

Example: finding faulty parts in a factory where almost every part is good. Always look at missed defects and rejected good parts separately. Factory example

You want the most likely problems first

Use ROC-AUC to check the ordering of scores. For rare problems, PR-AUC or AP also helps show how useful the alerts are as you find more cases.

Example: putting suspicious payments at the top of a fraud review queue. Check the results for the number of payments your team can actually review. Review-queue example · Object-detection example

You need to trust the predicted chances

Use log loss or Brier score to check probability predictions.

Example: if many patients each receive a 20% risk estimate, does about 1 in 5 have the condition? A calibration plot helps you check this. Risk-score example

You care about what happens over time

Check false alarms per hour or kilometer, detection delay, and track recall.

Example: a car should spot a pedestrian quickly, keep following them, and avoid repeated false warnings. Decide what counts as one warning before measuring it. Driving-hours example · Rare-hazard example

Choose the setting that catches enough problems without causing too many false alarms. Try a scenario in the calculator ↓

Examples by industry: driving, medicine, fraud & more

Start with the metric recommendation, then use the worked example to see what the numbers mean. The numbers are made up; published sources explain the testing methods.

A cutoff is the score at which a case gets flagged. Changing it changes misses and false alarms.

Formula key & reading tips
TP
Actual positive, correctly flagged.
TN
Actual negative, correctly cleared.
FP
False positive: a false alarm.
FN
False negative: a missed positive.
N
Total cases: TP + TN + FP + FN.
P, R
Precision and recall.
p, y
Predicted positive probability; actual label (1 or 0).
TPR
Recall; TNR is specificity. PPV is precision.

“Positive” means the thing you want to find, such as fraud or an illness. “Prevalence” means how common it is. These formulas compare two classes: positive and negative. If the bottom of a fraction is zero, the rate cannot be calculated; some tools show a chosen default instead. Ranking and probability scores need the original model scores. Timing metrics need event timestamps.

Confusion matrix calculator

Enter your counts, then select a metric to see its calculation. Presets are illustrative examples, not industry targets.

Predicted +Predicted − Actual +
Actual −

Total cases: 100

Examples use made-up numbers to explain the metrics. They are not performance targets, and they do not change when you edit the calculator.

Definitions: scikit-learn evaluation guide · Average precision conventions. For driving and tracking metrics, define what counts as an event or a successful detection before comparing results.