KatInterview

Choosing and Defending Metrics for a Rare-Class Abuse Detector

Machine LearningModel answer
MediumModel answerMachine Learningimbalanced-classificationprecision-recallthreshold-tuning

Last updated

Pick, justify, and stress-test evaluation metrics for an imbalanced fake-account classifier, wiring thresholds to asymmetric action costs and biased labels.

Context

Your team ships a classifier that scores each account with a probability of being fraudulent. Product and leadership want to know how you will judge whether it "works well," both before launch and after.

Your task

  1. Recommend which evaluation metrics you would use to assess this classifier and say why, given that fraud is rare.
  2. Contrast precision, recall, F1, ROC-AUC, and PR-AUC — what each one does and does not tell you here.
  3. Explain how false positives and false negatives map to business costs, and how you turn those costs into a decision threshold.
  4. Describe the traps that arise when measuring in production (class prevalence, label bias, adversaries, drift) and how you would keep the evaluation trustworthy.
  5. Close with the handful of metrics you would put in front of leadership.

Assume a heavy class imbalance, multiple possible actions (hard block, step-up verification, manual review queue, silent downranking), and whose cost is non-symmetric.

Hints

Hint 1

Accuracy and ROC-AUC both look great under heavy imbalance — say explicitly why, and what you report instead.

Hint 2

Write down the expected cost of acting versus not acting on an account, and derive the threshold from the cost ratio.

Hint 3

Evaluate recall only on labels you can trust-unbiased: random human-reviewed samples, not the accounts your own model flagged.