top of page

ROC Curve Visualizer

Background: A classifier produces a score for an input that represents something like "how strongly does this look positive." Whether something gets called positive or negative only happens once you pick a threshold and compare the score against it. That means the same underlying model has a different sensitivity (percent of positives it flags) and specificity (percent of negatives it doesn't flag) at every possible threshold: push the threshold down and you catch more true positives but also let in more false positives; push it up and you get the opposite trade.

 

A good classifier is one where the score distributions for the two classes barely overlap, so most thresholds give you high sensitivity and high specificity at the same time. A poor classifier has heavily overlapping distributions, so any threshold forces a steep trade-off between the two. The ROC curve is just this trade-off traced out across thresholds.

For the tool below: drag the threshold slider and watch the dashed line sweep across both score distributions while the dark dot moves along each ROC curve in lockstep — that's the same threshold being applied to a good and a poor classifier simultaneously, so you can directly compare how much sensitivity (the fraction of the red curve past the threshold) each one sacrifices for the same specificity (the fraction of the blue curve below the threshold). The four colored dots mark fixed reference thresholds (t = 0, 1, 2, 3) for comparison.

bottom of page