Threshold Tuner
Drag a threshold across your own scores and watch precision, recall and expected cost move with it.
10 caught, 2 missed, 8 false alarms out of 34 examples.
- True positives / false positives
- 10 / 8
- False negatives / true negatives
- 2 / 14
- F1.00 at this threshold
- 0.667
- Threshold with the highest Fβ
- 0.5500 (Fβ 0.690)
- Threshold with the lowest expected cost
- 0.3400 (cost 12.0)
- Cost at your threshold
- 18.0
- ROC AUC — threshold-free ranking quality
- 0.818
- Average precision (area under the PR curve)
- 0.711
Everything on this page runs in your browser. Nothing you paste is uploaded, logged, or put in the URL — only the settings above the input are, so a configured tool can be linked to.
The threshold is a product decision wearing a lab coat
Precision and recall trade against each other along a single dial, and no amount of model work moves both at once — that is what the curve above shows. Which point you choose is not a modelling question. It is a question about what a false positive costs you compared with a false negative, and it is answerable only by the person who has to handle both. A spam filter and a cancer screen sit at opposite ends of the same curve for reasons that have nothing to do with the classifier.
That is why the cost fields are here. Fill them in with anything on a common scale — support minutes, refunds, hours of review — and the "lowest expected cost" row picks the threshold your own numbers imply. It will frequently disagree with the best-F1 threshold, and when it does, the cost answer is the right one. F1 is only the correct objective when a miss and a false alarm hurt you equally, which is almost never true.
Two traps
First, a threshold tuned on your test set is fitted to your test set. Split the data, tune on one half, report on the other, or expect the production numbers to come in worse. Second, the AUC row is deliberately separate from everything above it: it summarises the ranking regardless of threshold, so it is the number to watch when comparing models and the number to ignore when choosing an operating point.