KatInterview

Core ML Fundamentals: Generalization, Imbalance, and Missingness

Machine LearningModel answer
EasyModel answerMachine Learningbias-varianceclass-imbalancemissing-data

Last updated

A foundational machine learning assessment covering model capacity trade-offs, handling heavily skewed class distributions, and processing incomplete data features.

In a machine learning technical round, candidates are evaluated on their ability to reason through core concepts, diagnose practical failure modes, and apply targeted remedies.

Answer the following three modules clearly and concisely:

Module 1: Generalization, Capacity, and Bias-Variance

  1. Formally define overfitting and underfitting using performance metrics on train vs. validation splits.
  2. Explain how to diagnose which issue is present using training history and validation curves.
  3. State the bias-variance decomposition of expected prediction error, detailing how model complexity, regularization, and dataset size affect both terms.
  4. List concrete remedies for both overfitting and underfitting, noting the operational trade-offs of each action.

Module 2: Skewed Label Distributions (Class Imbalance)

  1. Explain why standard evaluation metrics (like raw accuracy) become deceptive when one class is extremely rare (e.g., 0.1% positive).
  2. Detail appropriate evaluation strategies and metrics (e.g., PR-AUC, ROC-AUC, F-beta) based on task goals (ranking vs. probability estimation vs. hard decisions).
  3. Compare techniques for handling imbalance during modeling (class weighting, resampling methods like SMOTE or undersampling) and explain their impact on model probability calibration.
  4. Describe how cross-validation splitting strategies should be configured to prevent optimistic bias.

Module 3: Incomplete Feature Sets (Missing Data)

  1. Define the primary mechanisms of missingness: Missing Completely at Random (MCAR), Missing at Random (MAR), and Missing Not at Random (MNAR).
  2. Outline practical strategies for handling missing attributes (deletion, baseline imputation, model-based imputation, indicator variables, and native tree-based handling).
  3. Explain how to implement imputation pipelines correctly to prevent data leakage between training and inference environments.

Hints

Hint 1

Focus on how train and validation loss curves diverge over time or complexity.

Hint 2

Consider how metric choices differ when business costs for false positives and false negatives are asymmetric.

Hint 3

Ensure feature imputation parameters are fit strictly on the training partition and transformed on test/inference sets.