The familiar 0.5 is a default decision rule, not a universal optimum. It is justified by calibrated probabilities and equal costs for false positives and false negatives. If the scores are not calibrated, the numerical threshold should not be interpreted as a probability.
Let error costs guide the cutoff
For a case with calibrated positive probability p, predicting positive has expected cost (1 - p) C_FP; predicting negative has expected cost p C_FN. Choose positive when the first is smaller:
(1 - p) C_FP < p C_FN
Solving gives p > C_FP / (C_FP + C_FN). If a missed positive costs 20 and a false alarm costs 1, the cost-based threshold is about 0.048. If a false alarm costs 50 and a miss costs 1, it is about 0.980. These are starting points for calibrated probabilities; operational limits and model uncertainty still matter.
Explore the cost curve
The chart compares total error cost across thresholds for its fixed example dataset. Change Cost of a miss (false negative) and Cost of a false alarm (false positive). When missing a positive becomes more expensive, the minimum-cost point moves toward a lower threshold. When false alarms become expensive, it moves higher. This curve illustrates the trade-off; it is not a guarantee that the same threshold will be best on your data.
When costs are hard to estimate
Choose a measurable operating requirement instead:
- Recall target: find a threshold that catches at least the required share of positives, then inspect the resulting false alarms.
- Precision target: require a minimum fraction of alerts to be correct, then measure how many positives are missed.
- Review capacity: take the highest-scoring cases up to the team’s available capacity.
- F-score: use F1 when precision and recall matter similarly, or F-beta when one matters more. Select the score on validation data.
None of these choices is value-free. State the constraint and show the resulting confusion matrix so readers can see the practical workload and error counts.
Worked example
Suppose a screening model ranks 1,000 patients, 100 of whom have a condition. At threshold 0.5 it flags 40 patients and catches 30 cases: precision is 30/40 = 75% and recall is 30/100 = 30%. Lowering the threshold might flag 120 and catch 75: recall rises to 75%, while precision becomes 75/120 = 62.5%. Whether that is better depends on follow-up capacity and the relative harm of a missed case and an unnecessary review.
Keep threshold selection honest
Tune the threshold using validation data or out-of-fold predictions, then evaluate the chosen rule once on the test set. Picking a threshold on the test set and reporting its score makes the test result optimistic. If the class prevalence or error costs change in production, review the operating point again.
Cost-derived thresholds require probabilities that represent real frequencies; check calibration or calibrate on separate validation data. Threshold tuning cannot repair poor ranking, missing features, or a model that does not generalize.