Learn Before
Concept

Ridge Regression

In ridge regression, the model coefficients and bias are learned using the least-squares criterion with an added penalty for large coefficients. The parameters are found by minimizing an objective function that includes a tuning parameter (often denoted as λ\lambda or α\alpha) to control the strength of this penalty term. Once the parameters are learned, the prediction formula is the same as in ordinary least squares (OLS).

Ridge regression uses L2L_2 regularization (weight decay), which adds the sum of the squared coefficients to the residual sum of squares (RSS):

RSSRIDGE(βj,β0)=i=1n(yiβ0j=1pβjxij)2+λj=1pβj2=RSS+λj=1pβj2RSS_{RIDGE}(\beta_{j}, \beta_{0}) = \sum_{i=1}^{n} ({y}_{i}-{\beta}_{0}-\sum_{j=1}^{p}{\beta}_{j}{x}_{ij})^2 +\lambda\sum_{j=1}^{p}{\beta}_{j}^2=RSS+\lambda\sum_{j=1}^{p}{\beta}_{j}^2

A higher tuning parameter (λ\lambda or α\alpha) results in more regularization and a simpler model. Ridge regression is especially useful when the number of predictor variables is greater than the number of observations. Because the penalty term is sensitive to the scale of the variables, predictors should usually be standardized before applying ridge regression.

0

2

Updated 2026-06-12

Tags

Data Science

D2L

Dive into Deep Learning @ D2L