Skip to content
BIASED

Regularization

Block 1 of 8~2 min

Fitting is easy; trusting is not

Stochastic and adaptive optimizers explained how to approach a training minimum. Least squares showed why that minimum can still be unstable. Nearly duplicate features allow large cancelling weights, and a flexible model can fit sampling noise. Regularization changes the objective itself.

We use the unaveraged squared error ∥y−Xw∥2\lVert y-Xw\rVert^2. Features are centred and scaled using training data; the target is centred. The intercept is restored afterward and is not penalized. The numerical value of a penalty parameter depends on this normalization.

A weight changes when its feature's units change. Penalizing weights without controlling units therefore changes the model's preference. Fit the scaler inside each training fold, then apply that fitted transform to the validation fold. A penalty can reduce variance at the cost of bias; it does not guarantee lower prediction error for every dataset.

Answers are saved on the server and tied to this browser until you sign in.

Go deeper — optional

Code and labs do not count toward the main percentage or the certificate.

  • Regularization: shrinkage and penalty selectionoptional

    Check ridge and soft thresholding; reproduce penalty selection on synthetic data with fold-local preprocessing.

    ~25 min · easier on a computer · The matching course topic has been read.

    Self-check in the notebook — not part of mastery or the certificate.