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.
Compare common outlier-detection techniques for a numeric feature: IQR-based capping or trimming, z-score and robust z-score, Winsorization, and (for a multivariate view) Isolation Forest, Local Outlier Factor, or DBSCAN-based approaches. For each, note the distributional assumptions, sensitivity to sample size and skew, and how treatment differs by downstream model type.
Behavioral: describe a time a preprocessing or data-quality decision you made changed the outcome of a model, an experiment, or a business decision. Use the STAR method (Situation, Task, Action, Result): what was your reasoning for the chosen approach, how did you validate its impact, and what did you learn?
Propose using a generative model (a tabular GAN such as CTGAN, or a VAE) to synthesize additional minority-class records for training. Cover conditioning strategy, evaluation of the synthetic data's fidelity and downstream utility (for example a classifier two-sample test), and the privacy risks (including membership inference) of training on real minority examples and generating from them.
A stakeholder tells you to 'catch every case' of a rare, costly outcome (fraud, churn, a safety incident) regardless of false positives. How do you explain the precision/recall trade-off to a non-technical audience, translate it into business terms (operational cost, reviewer time), and propose a plan that balances detection with the team's capacity to act on alerts?
Describe the preprocessing challenges of multilingual text input (multiple scripts, inconsistent encodings, different tokenization needs per language, code-switching). Propose a pipeline covering Unicode normalization, script or language detection, language-specific tokenizers, and how you would build a shared feature representation across languages for a downstream classifier.
Unlock Full Question Bank
Get access to all Data Preparation and Class Imbalance for ML interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.