Multicollinearity › Solutions to Multicollinearity: Ridge Regression
Machine Learning from ScratchAll chapters Multicollinearity › Solutions to Multicollinearity: Ridge RegressionOne section · Sections in this chapter7 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
When multicollinearity is detected, several remedial approaches are available. Ridge regression is one of the most effective solutions, as it handles multicollinearity automatically through regularization.
Ridge regression adds a penalty term to the regression equation that shrinks coefficients toward zero, reducing their variance and making them more stable. The regularization parameter α controls the amount of shrinkage.higher values lead to more shrinkage and greater stability.
The key advantage of Ridge regression is that it doesn't require removing variables; instead, it stabilizes all coefficients while keeping them in the model. This makes it particularly useful when all variables are theoretically important.
Let's see how Ridge regression handles our multicollinear health data:



Coefficient Comparison: ================================================== Variable OLS Ridge Difference -------------------------------------------------- Age -4.752 -4.707 0.045 Height -9.009 -5.938 3.071 Weight 0.344 0.256 0.088 BMI -9.546 -6.499 3.047 Optimal Ridge α: 0.206 Ridge Regression Analysis: OLS coefficient range: 9.890 Ridge coefficient range: 6.755 Shrinkage ratio: 0.683 (lower = more stable) Coefficient stabilization: 31.7% reduction in range
Example: Condition Index Analysis
This example shows how to use condition index and eigenvalues to diagnose multicollinearity:


Multicollinearity Diagnostics: ======================================== Largest eigenvalue: 2.043 Smallest eigenvalue: 0.005 Condition index: 20.3 Number of eigenvalues < 0.1: 1 Number of condition indices > 30: 0