liveBook · Manning

Regularization

As explained in Machine Learning Algorithms in Depth

A modeling technique that adds a penalty or constraint to discourage undesirable parameter values, such as excessive magnitude.

Regularization modifies a loss function to prefer smaller parameter values, resolving cases where several parameter settings achieve the same empirical risk. section 5.3

For a support vector machine, the penalty applies to θ but not θ₀: θ controls boundary orientation, while θ₀ controls its offset. Minimizing the L2 norm of θ under correct-classification constraints increases the margin and yields a maximum-margin solution. section 5.3

The treatment connects regularization to:

  • Empirical risk minimization, by replacing an underdetermined loss objective with a preference for smaller parameters. section 5.3
  • Quadratic programming, by expressing margin maximization as a quadratic objective with linear classification constraints. section 5.3
  • Logistic regression, where regularization is added to the objective and its gradient before stochastic-gradient updates. section 5.4

Implementation examples

An SVM implementation exposes a regularization parameter C alongside kernel settings. An SGD logistic-regression implementation initializes lmbda and computes a regularized objective and gradient while training on a synthetic Gaussian-mixture dataset.

Figure 5.8 Max margin solution of SVM classifier
figure

Visualizes how shrinking the parameter norm pushes margin boundaries apart until the unique maximum-margin solution is reached. section 5.3

How Machine Learning Algorithms in Depth covers it

How deep it goes
Derives L2-norm margin optimization and regularized gradients, then implements both SVM and logistic-regression training.
Examples
Uses maximum-margin SVM geometry, an SVM implementation, and SGD logistic regression on a synthetic Gaussian-mixture dataset.
What it assumes
Assumes empirical loss, model parameters, classification constraints, gradients, and stochastic-gradient optimization.
What you can do after
Build regularized SVM and logistic-regression training procedures with explicit objectives, gradients, constraints, and parameters.
How it connects
Connects empirical risk, support vector machines, decision boundaries, quadratic programming, logistic regression, and stochastic gradient descent.

Also explained in

Compare how 13 books explain regularization →

Related concepts

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