Each of the two classes produces a classifier score in [0,1] — a noisy, overlapping Gaussian per class, exactly what a real logistic regression or SVM outputs before thresholding. Dragging the threshold line (or the slider) reclassifies every point as "predicted positive" when score ≥ t:
TPR (Recall) = TP / (TP + FN)
FPR = FP / (FP + TN)
Precision = TP / (TP + FP)
F1 = 2·Precision·Recall / (Precision + Recall)
Sweeping t from 1 down to 0 traces the ROC curve (FPR on x, TPR on y, bottom panel) — every possible operating point of this classifier at once. The bright marker shows exactly where the current threshold sits on that curve. The diagonal is a coin-flip classifier; the further the curve bows toward the top-left corner, the better the separation.
AUC = ∫₀¹ TPR(FPR) dFPR (trapezoidal, 240 threshold steps)
- Samples per class / separation / noise — regenerate the underlying score distributions; more separation and less noise push AUC toward 1.0, full overlap pushes it toward 0.5.
- Decision threshold — drag the vertical line in the top panel, or use the slider; every dot recolors live by confusion-matrix outcome.
This is the same tradeoff every binary classifier in the article faces — a spam filter, a fraud detector, a cancer screen — moving the threshold always trades false positives against false negatives along this exact curve.