KatInterview

Setting a Score Cutoff: Weighing Missed Positives Against False Alarms

Machine LearningModel answer
EasyModel answerMachine Learningprecision-recallclassification-thresholdimbalanced-data

Last updated

Explain how precision and recall shift as a classifier's score cutoff moves, and justify a production threshold given unequal error costs, limited capacity, and rare positives.

Your team has trained a binary classifier that outputs a probability-like score for every case it sees. A downstream process (for example, a manual review, an outreach message, or an automatic block) is triggered only when the score is above a cutoff that you get to choose.

Walk through how you would reason about this decision. Your answer should:

  1. Define precision and recall in terms of the confusion matrix, and explain why neither is independent of the cutoff.
  2. Describe what happens to both metrics as the cutoff is raised or lowered, with particular attention to the case where positives are rare.
  3. Explain how you would pick a concrete operating point when a false alarm and a missed positive do not cost the same.
  4. Say how you would validate that choice before and after launch.

Assumptions

  • Positives make up a small share of the data.
  • The action fires only when score > cutoff.
  • Exact dollar figures for mistakes may not exist, so qualitative reasoning about costs is acceptable.

Questions you may want to raise first

  • What does a positive mean, and what happens after a positive prediction?
  • How harmful is each kind of error?
  • Is there a hard limit on how many cases can be reviewed or acted on?
  • Do calibrated probabilities and consistent behavior across user groups matter?

Hints

Hint 1

Start from the confusion matrix: precision asks 'of the cases I flagged, how many were real?', while recall asks 'of the real cases, how many did I flag?'. Note which cells appear in each denominator.

Hint 2

Think about sweeping the cutoff from 1 down to 0. What happens to the number of flagged cases, and which metric can only go up while the other tends to fall (noisily)?

Hint 3

Turn the choice into a decision: either minimize expected cost (cost_FP and cost_FN), or maximize recall subject to a capacity or precision floor. Then ask how you would check calibration, uncertainty, and subgroup behavior.