Evaluating a COD Fraud Model at a One Percent Base Rate

Last updated: November 29, 2026

Quick Overview

Flipkart wants a model that flags risky cash on delivery orders (likely to be refused or fraudulent) so they can be switched to prepaid only. Fraud is about 1% of COD orders. How would you evaluate the model and choose its operating threshold?

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

0

0

0 solved


Flipkart wants a model that flags risky cash on delivery orders (likely to be refused or fraudulent) so they can be switched to prepaid only. Fraud is about 1% of COD orders. How would you evaluate the model and choose its operating threshold?

COD is still a large share of Flipkart orders, and refused or fraudulent COD orders waste a full forward and return logistics trip. Data scientist screens use this to test whether you go beyond accuracy and AUC to precision recall trade-offs, calibration and business cost based thresholds.

What the Interviewer Expects
  • Explain why accuracy and even ROC AUC can mislead at a 1% base rate
  • Use precision, recall and PR AUC, ideally precision at a fixed review or block budget
  • Convert errors into rupee costs and pick a threshold that minimizes expected cost
  • Check calibration if probabilities drive decisions
  • Use time based validation splits
  • Plan an online test with guardrails on conversion
Key Topics to Cover
imbalanced classification
precision-recall
threshold selection
cost-sensitive evaluation
calibration
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 handle label delay, since refusals are known only days later?
  • Your model was trained on data where risky orders were already blocked; what bias does that create?
  • How would the threshold change during a sale when order mix shifts?
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
  • Label: order refused at door, or confirmed fraud, within 14 days.
  • Action: high risk orders are shown 'prepaid only'; that loses some genuine customers who will not prepay.
  • Base rate: about 1% po...
Approach

Skip accuracy: predicting 'not fraud' for everyone is 99% accurate. ROC AUC is threshold free but dominated by the huge negative class, so a model can look great while precision at useful thresholds i...


Submit Your Answer
Markdown supported