InterviewStack.io LogoInterviewStack.io

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.

EasyTechnical
45 practiced

Why does data augmentation improve generalization for deep learning models? Connect it to increasing effective dataset size, reducing overfitting, and acting as an inductive bias (an assumption about which transformations should not change the label). Discuss when augmentation can instead hurt production performance (the label-preserving assumption is violated, or there is a domain mismatch), and how augmentation relates to and can be combined with classical regularizers like L2 weight decay and dropout.

HardTechnical
73 practiced

Given an imbalanced multi-class problem where you are applying several preprocessing steps together (target encoding, PCA, and SMOTE), design a cross-validation and preprocessing protocol that fairly assesses performance and prevents leakage across all of them at once. Cover fold construction, the required order of operations, and metric selection.

HardTechnical
47 practiced

Estimate the timeline, headcount, and cost to collect one million high-quality labeled examples for a new model. State your assumptions (per-label cost, throughput per annotator), then propose concrete strategies to accelerate collection while maintaining quality, such as active learning, synthetic data, or data partnerships.

MediumTechnical
50 practiced

Design a checklist and technical approach to make a preprocessing pipeline reproducible across a team: versioning of code and dependencies, deterministic transforms (fixed random seeds), serialization of fitted transformers and scalers, data contracts and schema checks, and unit or integration tests. How would you enforce this via CI/CD, and how would you document it so both engineers and non-technical stakeholders can trust and audit a given model run?

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.

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.