Grades 9–12 · Everyday Life
How does changing a classification threshold change its errors?
A classifier can assign a numerical score without directly making a final decision. A threshold supplies the decision rule. In our fictional quality-inspection model, a higher score suggests greater suspicion of a defect, and an object is flagged when its score is at least the chosen threshold. The scores are not probabilities.
In the diagramA threshold trades two kinds of errorToy defect scores · truth supplied by inspectionFlag when score ≥ 50; scores are not probabilities1025405565758595Diamond: actual defect · circle: actual normalTP3FP2FN1TNFP 2: normal flagged; FN 1: defect missed.
The dataset contains eight objects, with scores from 10 to 95. A separate inspection supplies the actual labels. Four are defective, at scores 40, 65, 85 and 95. These labels let the diagram compare a decision with the stipulated truth rather than treating the score as truth itself.
A true positive is a defective object correctly flagged. A false positive is a normal object wrongly flagged. A false negative is a defect that was not flagged, and a true negative is a normal object correctly left unflagged. At threshold 50, the counts are respectively 3, 2, 1 and 2.
Raising the threshold to 80 leaves only scores 85 and 95 flagged. False positives fall to zero, but two defects are missed. Lowering it to 20 catches all four defects while wrongly flagging three normal objects. These changes follow from the same fixed scores, not improved underlying measurements.
No threshold is declared best. Rejecting a normal object and missing a defect can have different consequences, and a new population can have different score patterns. Error costs, data quality and intended use therefore belong alongside the counts. The toy explains a tradeoff, not a decision policy.
About this explanation
Starting knowledge: Read inequalities, classify paired observations and distinguish a model score from an observed label or a calibrated probability.
Sources
- Google for Developers — Thresholds and the confusion matrix