KatInterview

Picking Classification Metrics for an Imbalanced Medical Test

Statistics & ExperimentsModel answer
EasyModel answerStatistics & Experimentsclassificationmetricsclass-imbalance

Last updated

Choose and justify evaluation metrics for a rare-disease screening model where false negatives and false positives carry very different costs.

Scenario

You are a data scientist building a binary classifier for a diagnostic lab. The model screens blood samples and predicts whether a patient has a rare condition (Positive) or does not (Negative).

The Data

  • Samples processed per day: 500,000
  • Positive cases (condition present): 50 (0.01%)
  • Negative cases (condition absent): 499,950 (99.99%)

The Business Context

  • A false positive (flagging a healthy patient as sick) triggers expensive follow-up testing and causes significant patient anxiety. The cost is real but bounded.
  • A false negative (clearing a sick patient as healthy) means the condition goes untreated, with serious health consequences and substantial liability for the lab.
  • Internal estimates put the cost of a false negative at roughly 20× the cost of a false positive.

What You Are Asked to Do

  1. Explain why reporting model accuracy would be misleading here, and name a better metric or combination of metrics for this setting.
  2. Given the 20:1 cost asymmetry, how would you set the classification threshold (instead of the default 0.5)? Walk through the math, then describe how you would validate that choice before deploying.
  3. Compare ROC-AUC and Precision-Recall AUC as evaluation curves for this model. Which do you prefer, and why does the class distribution matter for that choice?

For each part, give concrete reasoning — use numbers from the scenario where it helps.

Hints

Hint 1

Start by computing what accuracy a model that predicts 'Negative' for every sample would achieve, then ask what its recall is. That tension is the whole argument against accuracy here.

Hint 2

For the threshold, think of it as a decision between two expected costs. Set them equal and solve for the probability cutoff — the cost ratio is your main input.

Hint 3

ROC-AUC's false-positive-rate axis divides by the number of true negatives. Ask yourself what happens to that denominator when negatives outnumber positives 10,000 to 1.