Drag a classification threshold across two overlapping score distributions and watch it trace out the ROC curve in real time — companion figure to Lecture 3: Supervised Learning.
A classifier rarely outputs a label directly — it outputs a continuous score: a hit-probability from a virtual screen, a blood–brain-barrier permeability estimate, a toxicity risk. Turning that score into a yes/no call requires picking a threshold, and where you set it trades false positives against false negatives. The ROC curve (Receiver Operating Characteristic) plots the True Positive Rate against the False Positive Rate as that threshold sweeps across every possible value; the AUC (Area Under the Curve) summarizes classifier quality independent of any single threshold choice.
The left panel shows the score distributions for the negative class (blue) and the positive class (orange). Drag the vertical line — or the slider below it — to move the classification threshold; everything to the right of it is predicted positive. The right panel shows the full ROC curve for the current pair of distributions, with a marker at the point corresponding to your current threshold.
Because AUC integrates over every possible threshold, it doesn't depend on how the scores are scaled, or on where you'd eventually set the cutoff — that choice comes later, driven by the relative cost of a false positive vs. a false negative in your specific screening campaign.
The same distribution families and the from-scratch ROC/AUC computation used in the figure above are reproduced in a Python notebook, then cross-checked against real sampled data and scikit-learn's roc_curve / roc_auc_score, and finally applied to a trained logistic regression classifier.