What is a ROC Curve?
A ROC curve plots the performance of a binary classification model at all classification thresholds. It shows the trade-off between sensitivity and specificity.
AUC (Area Under Curve) summarizes the entire ROC curve into a single number between 0 and 1.
One model, many thresholds
Move the threshold to see which examples are called positive. The model scores stay fixed; only the decision rule changes.
Call an example positive when its score ≥ threshold. Use arrow keys for steps of 0.05; Home / End select the extremes.
- True positives (TP)
- 4 / 5
- False positives (FP)
- 2 / 5
- False negatives (FN)
- 1 / 5
- True negatives (TN)
- 3 / 5
Try 1.00, then lower the threshold: more positives are found, but more negatives are flagged too. The dot moves along the curve; AUC stays fixed.
Inspect the synthetic examples
Five actual positives: 0.95, 0.85, 0.75, 0.55, 0.35.
Five actual negatives: 0.80, 0.50, 0.30, 0.20, 0.10.
Scores are illustrative, not calibrated probabilities. Each vertical step adds one true positive; each horizontal step adds one false positive. A positive outranks a negative in 21 of 25 pairs, so AUC = 0.84.