liveBook · Manning

Ridge regression

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

Ridge is a regularized linear regression estimator that penalizes the squared magnitude of coefficients.

Ridge regression is an L2-regularized linear model that penalizes squared coefficient magnitudes. It shrinks coefficients toward zero, giving larger coefficients stronger penalties without usually removing features entirely. section 4.3.2

Ridge is especially useful when predictors overlap:

  • Keeps multicollinear, predictive features in the model with generally similar-sized coefficients. section 4.3.2
  • Attenuates coefficients proportionally rather than selecting features as L1 regularization does. section 4.3.2

A regularized polynomial pipeline

A Scikit-learn workflow expands degree-two features, standardizes them, and fits Ridge(alpha=2500.0). Five-fold cross-validation reports an RMSE of 33.738 with a 0.275 standard deviation, alongside fit and prediction timings.

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

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.
How it connects
Connects L2 regularization with linear regression, multicollinearity, polynomial features, standardization, L1 regularization, and cross-validation.

Also explained in

Compare how 2 books explain ridge regression →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.