Labs / Classical ML
Classification threshold
Move the threshold and watch the confusion matrix, precision, recall, F1, and business cost change.
Theory and worked examples: Classification metrics and thresholds
Classification threshold lab
400 synthetic transactions, about 30% fraud. The model outputs a score; the threshold turns it into an action.
legitimatefraudthreshold
predicted fraudpredicted legitactually fraudactually legit
TP
58
caught
FN
66
missed · cost 660
FP
24
false alarm · cost 24
TN
252
correctly ignored
Every threshold is one point on this curve. The dashed diagonal is random guessing.
Calibrated: a score of 0.3 means about 30% of such cases are fraud. Toggle the overconfident model to see miscalibration.