MoonSay /Tutorials/Machine Learning Interview #2
Contents
  1. 01Introduction
  2. 02Setting and notation
  3. 03Intuition
  4. 04The decomposition and its proof
  5. 05A warm-up you can do by hand
  6. 06The experiment
  7. 07Models where every term has a formula
  8. 08Diagnosing bias and variance in practice
  9. 09Fixing high bias and high variance
  10. 10Beyond the classical picture
  11. 11Interview questions and model answers
  12. 12Summary
  13. References

12Summary

  • Model and definitions. y=f(x)+\varepsilon with \E\varepsilon=0 and \Var\varepsilon=\sigma^2. Average model \fbar(x)=\E_{\D}[\fhat(x;\D)]; bias \fbar-f; variance \E_{\D}[(\fhat-\fbar)^2].
  • Decomposition (squared loss, exact): \E[(y-\fhat)^2]=\sigma^2+(f-\fbar)^2+\E_{\D}[(\fhat-\fbar)^2]. Training error is optimistic: for least squares it is \sigma^2(1-p/n), against \sigma^2(1+p/n) on new responses.
  • Closed forms. Shrinkage c^\star=\mu^2/(\mu^2+\sigma^2/n); k-NN variance \sigma^2/k; least-squares average variance \sigma^2p/n; ridge shrinkage factors d_j^2/(d_j^2+\lambda) and \lambda^\star=\sigma^2/\beta^2 (orthonormal case); bagging variance \rho\sigma_f^2+(1-\rho)\sigma_f^2/B.
  • Diagnose. High training and validation error means bias; a large gap means variance. Learning curves tell you whether more data will help.
  • Fix. Bias: more capacity, better features, less regularization, boosting. Variance: more data, regularization, simpler models, bagging, early stopping.
  • Limits. Double descent in over-parameterized models; no additive decomposition for zero–one loss; bias and variance describe a procedure, not a single model.