Top 6 Class imbalance Interview Questions
Browse 6 real-world technical and behavioral interview questions about Class imbalance. Review scenarios, edge cases, and architectural best practices.
One transaction in two thousand is fraudulent and you have been asked to build the detector. How do you approach it?
Work backwards from the review capacity. Fix the alert budget the team can clear, evaluate precision and recall at exactly that budget on data at the real prevalence, define the label and its arrival delay before modelling, and never report accuracy, which a do-nothing model scores 99.95% on.
Your fraud model is 99.4% accurate. Is that good?
Almost certainly not: if fraud is 0.6% of transactions, a model predicting 'not fraud' for everything scores 99.4% and catches nothing. The metric has to follow from which error costs more, which makes it a business decision expressed in numbers rather than a modelling one.
How do you choose the decision threshold for a classifier, and what makes it move?
Choose a classifier decision threshold from calibrated probability, false-positive cost, false-negative cost and operational capacity. The threshold changes when costs, prevalence, calibration or alert budget changes. It also connects cost sensitive learning to the point an interviewer is testing.
Class weights, oversampling, undersampling, SMOTE. What does each one cost you?
Class weights, oversampling, undersampling and SMOTE are ways to train on imbalanced data, but none creates new signal. They change loss, sample frequency or geometry, so validation, calibration and threshold choice must be handled carefully. Use this class imbalance answer to show the decision, trade-off, and evidence rather than a memorised definition.
When does ROC-AUC mislead you, and when does a precision-recall curve mislead you instead?
ROC-AUC vs precision-recall is a metric choice for imbalanced classification. ROC-AUC measures ranking across all negatives, while PR curves expose alert precision and recall at the positive-class prevalence.
Most predictive maintenance projects never reach production. Why, and what would you do differently?
They fail on labels rather than models: failures are recorded as repair dates in free-text work orders, the positive class is nearly empty, feature windows leak the outcome, and no baseline was established, so an encouraging first result cannot be trusted or beaten.