THEORY BENCH

ML Technical Interview Interactive Theory Lab

Polynomial Model Complexity & Bootstrap Variance Simulation

Status
Optimal
Squared Bias
0.038
Model Variance
0.045
Irreducible Noise (σ²)
0.123
Expected Test MSE
0.206
INTERVIEW RUBRIC

Standard Interview Question

"Derive and explain the Bias-Variance Tradeoff. How do model complexity and dataset size shift the sweet spot?"

E[(y - f̂(x))²] = Bias[f̂(x)]² + Var[f̂(x)] + σ²

Expected Answer Strategy

  • High Bias (Underfitting): Model makes restrictive assumptions (e.g. degree 1 line fitting sine). Cannot capture true underlying pattern. High train & high test error.
  • High Variance (Overfitting): Model fits sample noise (high degree polynomials oscillating wildly). Low train error but poor generalization.
  • Irreducible Error (σ²): Noise in measurement/target that no model can eliminate.
  • Dataset Scaling: Increasing sample size (N) lowers the variance curve, shifting the optimal complexity rightward.

Senior Follow-Up: Mitigations

To reduce variance: Bagging / Ensembling (Random Forests average uncorrelated estimators, dividing variance by ~M), L1/L2 regularization, or collecting more training samples. To reduce bias: Increase capacity, add interaction features, or boost (GBM).

Enjoy this tool? Build your own with Super