MST0052 · Lecture 4 supplement · Optional
01
02
scikit-learn actually solves this via SVD — same answer, better numerics (backup).
03
This is the "variance" in the bias-variance tradeoff — Lecture 6.
Closed form of the penalised objective from the L4 deck.
04
Solve the normal equations in one shot. What LinearRegression does.
LinearRegression
Step downhill along −∇ until it flattens. How neural networks train.
Pre-tested: scripts/examples/lecture_04_linear_models_supplement.py. Standardise features first — gradient descent assumes comparable scales.
scripts/examples/lecture_04_linear_models_supplement.py
The Hessian 2X⊤X is positive semi-definite — the bowl is convex, the stationary point is the global minimum.