Training a Payment Fraud Classifier When Only 0.2% Is Fraud

Last updated: November 29, 2026

Quick Overview

Fraudulent payment attempts are 0.2% of Uber transactions. How would you train and evaluate a classifier on this data, and why might accuracy and ROC AUC be misleading?

Uber
Machine Learning
Data Scientist
Uber
November 29, 2026
Data Scientist
Technical Screen
Machine Learning
Medium

0

0

0 solved


Fraudulent payment attempts are 0.2% of Uber transactions. How would you train and evaluate a classifier on this data, and why might accuracy and ROC AUC be misleading?

Payment fraud (stolen cards, account takeovers) is a top risk area at Uber, with extreme class imbalance and costly errors in both directions. The interviewer wants practical handling of imbalance plus a metric that reflects the business cost.

What the Interviewer Expects
  • Explain why accuracy is useless at 0.2% prevalence
  • Prefer precision-recall curves and PR AUC; explain ROC AUC's optimism
  • Choose between class weights, downsampling and focal loss
  • Set the threshold from the cost of false positives and false negatives
  • Handle delayed labels from chargebacks
Key Topics to Cover
class imbalance
precision-recall
cost-sensitive thresholding
downsampling
delayed labels
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How would you pick the decision threshold?
  • What changes if fraudsters adapt to your model?
  • How do you handle labels that arrive 60 days later?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Ask what an action looks like: block the transaction, require card verification (step-up), or allow. Ask the costs: a missed fraud costs the fare plus chargeback fee, say $30; a false block costs a l...

Approach

Metrics. Predicting "not fraud" always gives 99.8% accuracy, so accuracy is meaningless. ROC AUC uses false positive rate FP/(FP+TN)FP/(FP+TN); with huge TN counts, a model can have FPR of 1% and AUC 0.97...


Submit Your Answer
Markdown supported