Sweeping every threshold
A single threshold gives one precision and recall pair. The ROC curve instead sweeps every possible threshold and plots the true positive rate against the false positive rate at each one.
Reading the curve
- The true positive rate is recall, the share of positives caught.
- The false positive rate is the share of negatives wrongly flagged.
- A perfect model hugs the top left corner, catching all positives with no false alarms.
- A random guesser traces the diagonal line.
The area under the curve
AUC is the area under the ROC curve, a single number from zero to one. It equals the probability that the model ranks a random positive above a random negative.
- An AUC of one is perfect ranking.
- An AUC of 0.5 is no better than chance.
- AUC is threshold independent, so it measures ranking quality rather than a single operating point.
Key idea
The ROC curve shows the true positive versus false positive tradeoff across all thresholds, and AUC compresses it into one threshold independent measure of how well the model ranks positives above negatives.