Interview practice question
XGBoost ignoring the minority class
Machine Learning · Classical ML · Intermediate
Your XGBoost fraud model predicts almost no fraud cases. How do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Default threshold 0.5 is too high for rare classes.
- Set scale_pos_weight.
- Evaluate with PR-AUC; tune threshold.
- Check that early stopping uses a suitable metric.
- Recalibrate if weights distort probabilities.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.