Skip to content
RED SAGSkills
mediumMachine Learning Engineer interview question

You are building a fraud model where 0.5% of transactions are fraud. Walk through how you would train and evaluate it.

What the interviewer wants to hear

  • Use metrics such as PR-AUC, recall at fixed precision, not accuracy
  • Class weights, resampling on training data only, or focal loss
  • Tune decision threshold using business costs
  • Time-based split and watch for label delay
  • Error analysis on false positives and negatives

Model answer

First I would agree on the right metric. Accuracy is useless here, so I would use PR-AUC and recall at a fixed precision, or a cost-based metric using the real cost of missed fraud versus blocked good customers. I would split by time, because fraud patterns change and the model will predict the future. I would also check label delay, since chargebacks can arrive weeks later. For training, gradient boosting works well on tabular fraud data. I would handle imbalance with class weights or by undersampling negatives in the training set only, and then correct the probabilities if needed. After training, I would choose a threshold on validation data that matches the review team capacity or cost trade-off. Finally I would do error analysis on false positives and false negatives to find new features, and monitor drift after launch.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Machine Learning Engineer questions