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
Visualizes how shrinking the parameter norm pushes margin boundaries apart until the unique maximum-margin solution is reached. section 5.3












