Regularization adds a preference for simpler models to training. Instead of minimizing training error alone, a regularized objective combines a loss term, which measures fit to observed data, with a penalty term, which measures model complexity. The balance matters: minimizing loss alone can produce a model that fits training data extremely well but fails to generalize; emphasizing the penalty too strongly can make the model too simple to capture the signal. section 6.2.2 section 7.1.1
The regularization parameter sets that balance. With an α-style objective, larger α puts more weight on simplicity, raising training error and risking underfitting; smaller α favors training fit and can permit overfitting. Some estimators express the same tradeoff in the opposite direction: in support vector regression, small C emphasizes regularization, while large C emphasizes fit. section 6.2.2 section 1.3.2
Regularization can constrain complexity in several ways:
- Restrict tree structure, such as maximum depth or node count, so trees cannot grow arbitrarily complex. section 6.2.2
- Apply an L2 penalty directly to model parameters, shrinking weights to improve robustness, particularly with highly correlated features. section 7.1.1
- Apply an L1 penalty, which shrinks weights more strongly and encourages sparse models through implicit feature selection. section 7.1.1
- Combine L1 and L2 penalties with Elastic Net to balance sparsity and robustness. section 7.1.1
- Penalize the number of leaf nodes in boosted trees, encouraging shallower, weaker trees. section 6.3.1
Tuning an SVM without trusting training fit
An RBF support vector regressor makes the tradeoff visible. At low C, the learned curve is flatter and less complex, often underfitting. Raising C lets the curve follow the training data more closely, but sufficiently high values can overfit. Compare cross-validated training and test R² across candidate C values rather than selecting the setting with the best training score. section 1.3.2 section 1.3.2
Regularized objectives can also change optimization behavior. Adding a smoothing term can make a loss more convex, or bowl-like, with a better-defined minimum; this added structure can stabilize and accelerate learning. The benefit is not free: regularization strengths such as α and the XGBoost leaf penalty γ are user-selected parameters, commonly chosen with cross-validation, adding model-development effort. section 6.2.2 section 6.3.1
Table 7.1 Four popular linear regression methods that all use the squared-loss function but use different regularization approaches to contribute to model robustness and sparsity (view table figure)
Compare OLS, Ridge, LASSO, and Elastic Net: all use squared loss, but their penalties lead to different robustness and sparsity behavior. section 7.1.1












