The Wayback Machine - https://web.archive.org/web/20241227230047/https://www.geeksforgeeks.org/what-is-ridge-regression/
Open In App

What is Ridge Regression?

Last Updated : 11 Jun, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Ridge regression, also known as Tikhonov regularization, is a technique used in linear regression to address the problem of multicollinearity among predictor variables. Multicollinearity occurs when independent variables in a regression model are highly correlated, which can lead to unreliable and unstable estimates of regression coefficients.

Understanding-Ridge-Regression-copy
What is ridge regression?

Ridge regression mitigates this issue by adding a regularization term to the ordinary least squares (OLS) objective function, which penalizes large coefficients and thus reduces their variance.

What is Ridge Regression?

Multicollinearity occurs when two or more predictor variables in a regression model are highly correlated, leading to unreliable and unstable estimates of regression coefficients. Ridge regression is a procedure for eliminating the bias of coefficients and reducing the mean square error by shrinking the coefficients of a model towards zero in order to solve problems of overfitting or multicollinearity that are normally associated with ordinary least squares regression.

It adds an additional term to the OLS loss function that pulls the estimating coefficients toward zero. This is done by adding a penalty term to the log likelihood, where this penalty term is governed by a parameter denoted as lambda (Îŧ), thus lowering the variance of the model and increasing its stability as well as the robustness of the prediction made by the model.

Ridge regression is particularly useful in cases where predictor variables are correlated or if the number of predictor variables is greater than the number of observing factors, as it yields more stable and reliable results.

Mathematical Formulation: Ridge Regression Estimator

Consider the multiple linear regression model:

y=XÎē+Ïĩ

where y is an n×1 vector of observations, X is an n*p matrix of predictors, Îē is a p×1 vector of unknown regression coefficients, and Ïĩ is an  n×1 vector of random errors. The OLS estimator of Îē is given by:

\hat{\beta}_{\text{OLS}} = (X'X)^{-1}X'y

In the presence of multicollinearity, X^â€ēX is nearly singular, leading to unstable estimates. The ridge regression estimator modifies this by introducing the ridge parameter k:

\hat{\beta}_k = (X'X + kI)^{-1}X'y

Bias-Variance Tradeoff in Ridge Regression

Ridge regression allows control over the bias-variance trade-off. Increasing the value of Îŧ increases the bias but reduces the variance, while decreasing Îŧ does the opposite. The goal is to find an optimal Îŧ that balances bias and variance, leading to a model that generalizes well to new data.

Bias-Variance-Tradeoff-in-Ridge-Regression
Bias-Variance Tradeoff in Ridge Regression

Ridge regression introduces bias into the estimates to reduce their variance. The mean squared error (MSE) of the ridge estimator can be decomposed into bias and variance components:

\text{MSE}(\hat{\beta}_k) = \text{Bias}^2(\hat{\beta}_k) + \text{Var}(\hat{\beta}_k)

  • Bias: Measures the error introduced by approximating a real-world problem, which may be complex, by a simplified model. In ridge regression, as the regularization parameter k increases, the model becomes simpler, which increases bias but reduces variance.
  • Variance: Measures how much the ridge regression model's predictions would vary if we used different training data. As the regularization parameter k decreases, the model becomes more complex, fitting the training data more closely, which reduces bias but increases variance.
  • Irreducible Error: Represents the noise in the data that cannot be reduced by any model.

As k increases, the bias increases, but the variance decreases. The optimal value of k balances this tradeoff, minimizing the MSE.

Selection of the Ridge Parameter in Ridge Regression

Choosing an appropriate value for the ridge parameter k is crucial in ridge regression, as it directly influences the bias-variance tradeoff and the overall performance of the model. Several methods have been proposed for selecting the optimal ridge parameter, each with its own advantages and limitations. Methods for Selecting the Ridge Parameter are:

1. Cross-Validation

Cross-validation is one of the most widely used methods for selecting the ridge parameter. The data is divided into multiple subsets, and the model is trained on some subsets while being validated on the remaining ones. This process is repeated multiple times, and the average performance across all iterations is used to determine the optimal value of k.

  • K-Fold Cross-Validation: The data is divided into K subsets (folds). The model is trained on K-1 folds and validated on the remaining fold. This process is repeated K times, with each fold being used as the validation set once. The average performance across all folds is used to select k.
  • Leave-One-Out Cross-Validation (LOOCV): A special case of K-fold cross-validation where K equals the number of observations. Each observation is used as a validation set once, and the model is trained on the remaining observations. This method is computationally intensive but provides an unbiased estimate of the model's performance.

2. Generalized Cross-Validation (GCV)

Generalized Cross-Validation is an extension of cross-validation that provides a more efficient way to estimate the optimal k without explicitly dividing the data. GCV is based on the idea of minimizing a function that approximates the leave-one-out cross-validation error. It is computationally less intensive and often yields similar results to traditional cross-validation methods.

3. Information Criteria

Information criteria such as the Akaike Information Criterion (AIC) and the Bayesian Information Criterion (BIC) can also be used to select the ridge parameter. These criteria balance the goodness of fit of the model with its complexity, penalizing models with more parameters.

4. Empirical Bayes Methods

Empirical Bayes methods involve estimating the ridge parameter by treating it as a hyperparameter in a Bayesian framework. These methods use prior distributions and observed data to estimate the posterior distribution of the ridge parameter. Empirical Bayes Estimation: This method involves specifying a prior distribution for ?k and using the observed data to update this prior to obtain a posterior distribution. The mode or mean of the posterior distribution is then used as the estimate of ?k.

5. Stability Selection

Stability selection is an alternative procedure that combines subsampling with selection algorithms to improve the robustness of the selected ridge parameter. It involves repeatedly fitting the model on different subsamples of the data and selecting the parameter that appears most frequently.

The data is randomly subsampled multiple times, and the ridge parameter is selected for each subsample. The final ridge parameter is chosen based on the frequency of its selection across all subsamples.

Practical Considerations for Selecting Ridge Parameter

  • Tradeoff Between Bias and Variance: The choice of the ridge parameter k involves a tradeoff between bias and variance. A larger k introduces more bias but reduces variance, while a smaller k reduces bias but increases variance. The optimal k balances this tradeoff to minimize the mean squared error (MSE) of the model.
  • Computational Efficiency: Some methods for selecting k, such as cross-validation and empirical Bayes methods, can be computationally intensive, especially for large datasets. Generalized cross-validation and analytical methods offer more computationally efficient alternatives.
  • Interpretability: The interpretability of the selected ridge parameter is also an important consideration. Methods that provide explicit criteria or formulas for selecting k can offer more insight into the relationship between the data and the model.

Use Cases and Applications of Ridge Regression

  • Forecasting Economic Indicators: In other words, ridge regression can be applied to predict economic forecasts that can include growth in domestic products (GDP), inflation rates, unemployment rates, etc., using more than one predictor variable such as interest rates, consumer expenditure, industrial production, etc. When used, it can manage the phenomenon of multicollinearity among these predictors, making its forecasts more accurate.
  • Medical Diagnosis: The use of ridge regression comes in scenarios where there are multiple biomarkers, or diagnostics, that are correlated in a medical diagnosis task. It assists in constructing well-anchored diagnostic models since it allows for the control of multicollinearity in the set biomarkers, thus improving disease diagnosis as well as prognosis.
  • Sales Prediction: In marketing, ridge regression has wider applications to forecast sales with the help of different types of marketing, like advertisement cost, promotion, etc. It addresses issues of correlation between these marketing factors, thereby enabling marketers to better plan themselves and determine the best way to approach their sales targets.
  • Climate Modeling: The climate modeling methodology: Ridge regression, as mentioned above, is useful for climate modeling with the help of multiple climate principles like temperature, precipitation, and pressure to predict future climate. It assists in the development of accurate models and eliminates interference between the climate variables, hence developing more accurate climate models.
  • Risk Management: Ridge regression as used in credit scoring and other similar assignments in risk management. While including various financial ratios and characteristics of its customers, it is useful in evaluating the creditworthiness of the latter in cases of personal or business loans, addressing the issue of multicolinearity among the predictors, and thus improving the accuracy of risk analysis and management.

Advantages and Disadvantages of Ridge Regression

Advantages:

  • Stability: Ridge regression provides more stable estimates in the presence of multicollinearity.
  • Bias-Variance Tradeoff: By introducing bias, ridge regression reduces the variance of the estimates, leading to lower MSE.
  • Interpretability: Unlike principal component regression, ridge regression retains the original predictors, making the results easier to interpret.

Disadvantages:

  • Bias Introduction: The introduction of bias can lead to underestimation of the true effects of the predictors.
  • Parameter Selection: Choosing the optimal ridge parameter ?k can be challenging and computationally intensive.
  • Not Suitable for Variable Selection: Ridge regression does not perform variable selection, meaning all predictors remain in the model, even those with negligible effects.

Conclusion

Ridge regression is a powerful technique for addressing multicollinearity and overfitting in linear regression models. By introducing a penalty term, it stabilizes the estimates of regression coefficients, leading to more reliable and interpretable models. While it introduces bias, the reduction in variance often results in lower overall MSE. The choice of the ridge parameter k is critical and can be determined using methods such as cross-validation and generalized cross-validation. Ridge regression finds applications in various fields, including machine learning, genetic studies, econometrics, and engineering, making it an essential tool in the arsenal of statisticians and data scientists.


Next Article

Similar Reads

three90RightbarBannerImg