Ridge regression
Ridge regression is linear regression fitted with an L2 penalty on coefficient magnitudes, which shrinks estimates toward zero.
Grokking Machine Learning, Second Edition
L2 regularization penalizes squared coefficient values, shrinking them toward zero without usually making them exactly zero.
- How it is used
- Reduces overfitting in regression by balancing prediction error against coefficient size.
- How deep it goes
- Explains the L2 objective, coefficient shrinkage, iterative intuition, and scikit-learn use; defers the mathematical justification.
- Examples
- Uses movie watch-time coefficients and a degree-20 polynomial fitted to parabolic data.
- What you can do after
- Apply it via scikit-learn’s Ridge class, choose alpha, fit a model, and compare testing RMSE.
Read how Grokking Machine Learning, Second Edition explains ridge regression →
Ensemble Methods for Machine Learning
Ridge regression is linear regression fitted with an L2 penalty on the coefficients to reduce model complexity.
- How it is used
- Stabilizes continuous-label linear regression when correlated features make unregularized coefficient estimates unreliable.
- How deep it goes
- Explains the L2 objective, coefficient shrinkage, α tradeoff, implementation, and evaluation, but does not develop optimization internals.
- Examples
- Uses a noisy synthetic dataset with two correlated features, scikit-learn model comparisons, and a bike-rental GLM baseline.
- What you can do after
- Apply it via scikit-learn, tune α, compare predictions with related regressors, and evaluate held-out performance using MSE, MAD, or R2.
Read how Ensemble Methods for Machine Learning explains ridge regression →
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
Ridge is a regularized linear regression estimator that penalizes the squared magnitude of coefficients.
- How it is used
- Uses coefficient shrinkage to stabilize linear regression when predictive features are multicollinear.
- How deep it goes
- Explains squared penalties, proportional shrinkage, coefficient behavior, and a preprocessing-to-evaluation pipeline.
- Examples
- Demonstrates a Scikit-learn degree-two polynomial pipeline and contrasts its coefficient behavior with Lasso.
- What you can do after
- Apply it via Scikit-learn Ridge inside a preprocessing pipeline and evaluate it with five-fold cross-validation.
Build AI Drug Discovery Pipelines
Ridge is a linear-model regularization method that applies an L2 penalty to coefficient weights.
- How it is used
- Uses regularized linear regression to predict molecular solubility while retaining potentially redundant descriptors.
- How deep it goes
- Explains L2 shrinkage, preprocessing, hyperparameter search, validation RMSE, and coefficient interpretation, but not the optimization derivation.
- Examples
- Demonstrates molecular solubility prediction, descriptor coefficients, randomized alpha search, and a 1.489 validation RMSE.
- What you can do after
- Operate/configure a Scikit-Learn ridge pipeline and evaluate it with validation RMSE and coefficient inspection.
Read how Build AI Drug Discovery Pipelines explains ridge regression →
What to know first
- deep learningDeep learning is a machine-learning approach that uses neural networks with multiple computational layers to learn representations from data.
- mean squared errorMean squared error is the arithmetic mean of the squared differences between corresponding predicted and reference numerical values.
- normal distributionA normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
- overfittingOverfitting is a modeling condition in which a model adapts too closely to particular data, including its noise or idiosyncrasies, and consequently generalizes poorly to new data.
Related concepts
- weight decayuses · A regularization technique that reduces model parameter magnitudes during optimization, either by adding a penalty to the objective or by directly shrinking parameters.
- L1 regularizationcontrasts with · L1 regularization is a technique that adds a penalty proportional to the sum of absolute model-parameter values, encouraging sparse parameter estimates.
- l2 normconfigured by · The L2 norm of a vector is its Euclidean length, calculated as the square root of the sum of the squares of its components.
- linear regressionequivalent to · Linear regression is a statistical method that models a numeric response as a linear function of one or more predictor variables with fitted parameters.
- regularizationkind of · Regularization is a modeling technique that constrains learning or penalizes model complexity to discourage overfitting and improve generalization.
- coefficientuses · A coefficient is a numerical factor that multiplies a quantity or term, scaling its magnitude or contribution.
Questions about ridge regression
What is ridge regression?
Ridge regression is linear regression fitted with an L2 penalty on coefficient magnitudes, which shrinks estimates toward zero.
Which Manning books explain ridge regression?
Grokking Machine Learning, Second Edition, Ensemble Methods for Machine Learning, Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI and Build AI Drug Discovery Pipelines.
What should I know before learning ridge regression?
Manning books that teach ridge regression usually introduce deep learning, mean squared error, normal distribution and overfitting first.
What is the difference between ridge regression and L1 regularization?
Ridge regression is linear regression fitted with an L2 penalty on coefficient magnitudes, which shrinks estimates toward zero. L1 regularization is a technique that adds a penalty proportional to the sum of absolute model-parameter values, encouraging sparse parameter estimates.
What is ridge regression a kind of?
Ridge regression is a kind of regularization. Regularization is a modeling technique that constrains learning or penalizes model complexity to discourage overfitting and improve generalization.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



