Data Preparation and Class Imbalance for ML Questions

Preparing training data and handling skewed or shifting distributions. Covers preprocessing and cleaning for model input, data augmentation, distribution shift, class imbalance techniques (resampling, reweighting, threshold tuning), and cold-start scenarios where labeled data is scarce. Focuses on the data-side decisions that determine whether a model can learn at all.

MediumTechnical
79 practiced

You must pick a decision threshold so that recall stays at or above 0.90 while minimizing false positives (or, symmetrically, maximizing recall subject to a minimum precision constraint). Describe a reproducible approach using cross-validation and a held-out validation set to select the threshold under heavy class imbalance, how you would estimate the expected number of false positives per day at a given daily event volume, and how label lag would affect your recall estimate.

HardTechnical
52 practiced

Your dataset has significant label noise (say around 20% incorrect labels). Discuss model families and training strategies that are robust to it (robust loss functions, label smoothing, co-teaching, confident learning, noisy-student-style approaches), and propose an approach that both detects likely-noisy labels and trains a model that is robust to the remaining noise, under a limited human relabeling budget.

EasyTechnical
80 practiced

List and briefly explain five common strategies for handling missing values in a dataset (dropping rows or columns, mean/median/mode imputation, model-based imputation, and using a missingness indicator). For each, state a scenario (a type of data or model) where it is the right choice, and note how you would keep the same imputation logic consistent between training and inference.

MediumTechnical
66 practiced

Explain focal loss for binary classification: give the formula and the intuition behind its modulating factor. Explain how the hyperparameters alpha and gamma influence training dynamics, and give a scenario where focal loss is likely to outperform simple class weighting.

EasyTechnical
52 practiced

Explain how SMOTE (Synthetic Minority Over-sampling Technique) generates synthetic minority examples, and name its main variants (Borderline-SMOTE, ADASYN, SMOTEENN). List at least three pitfalls of applying SMOTE and one dataset characteristic that makes it a poor choice.

Unlock Full Question Bank

Get access to all Data Preparation and Class Imbalance for ML interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.