liveBook · Manning

Regularization parameter

As explained in Grokking Machine Learning

A training hyperparameter that controls the strength of the complexity penalty relative to predictive error.

A regularization parameter, written λ (lambda), sets how strongly training penalizes model complexity relative to regression error. The training objective adds the regularization term multiplied by λ. section 4.5

Changing λ shifts the balance between predictive performance and simplicity:

  • At λ = 0, the penalty disappears, leaving the unregularized regression model. section 4.5
  • A large λ favors a simpler model, which may fit the dataset poorly. Use validation to help choose a suitable value. section 4.5

Try it with lasso and ridge

Given a polynomial regression model, MAE error, and λ = 0.1, determine its lasso error using the L1 norm and its ridge error using the L2 norm. section 4.8

How Grokking Machine Learning covers it

How deep it goes
Defines λ in the regularized error formula and explains zero and large values, but gives no detailed selection procedure.
Examples
Uses a λ = 0.1 polynomial-regression exercise to compare lasso and ridge errors under MAE.
What you can do after
Apply validation to help choose λ while balancing model simplicity and predictive performance.
How it connects
Connects regularization to regression error, lasso, ridge regression, validation, and model complexity.

Also explained in

Compare how 2 books explain regularization parameter →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning. The section links point to the parts of the book it draws on.