Back to the 2022 paper

Module 2: Linear Models and Bayesian Learning

20222m

Which of the following steps/assumptions in regression modeling impacts the trade-off between under-fitting and over-fitting the most?
(i) The polynomial degree
(ii) Whether we learn the weights by matrix inversion or gradient descent
(iii) The use of a constant-term
(iv) None of the above

Worked SolutionAI Assisted

Answer: (i) The polynomial degree

Explanation — Underfitting vs Overfitting trade-off:

  • Model complexity controls bias-variance trade-off. Polynomial degree directly controls capacity:

    • Degree=1 (linear) — high bias, may underfit non-linear data
    • Degree too high (e.g., 10 for 20 points) — low bias but high variance, overfits noise, oscillates
  • (ii) Whether we learn weights by matrix inversion vs gradient descent — Both solve same optimization w=(XTX)−1XTyw = (X^T X)^{-1}X^T y vs iterative; they reach same ww (if convex), so no impact on generalization.

  • (iii) Use of constant-term (bias w0w_0) — Important to fit intercept, but small impact compared to degree. Without bias, model forced through origin — may underfit slightly, but not as dramatic as degree change.

Thus degree (i) is the dominant hyperparameter governing over/under-fitting.

Other factors affecting trade-off: regularization λ\lambda, training set size, early stopping.

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.