Centering vs standardizing in ridge regression I have read that to apply ridge regression, we first need to standardize the predictive variables. That is because the variables should be in a homogenous scale so that lambda has an effect of the same magnitude on all of them.
However, taking a look at the ridge regression implementation of the scikit-learn library, I see that the X variables are centered but not standardized. That is, the variables retain their scale.
I was wondering if you know why that is, and when is each technique (standardization vs centering) advised.

Looking at the source code is not necessarily the best way of learning such things. If you look at this discussion at Scikit-learn's GitHub (and outgoing links) its developers decided to deprecate a misleading default argument, so instead users could explicitly scale the data, as they suggest, with StandardScaler, i.e. subtracting the mean and dividing by standard deviation. So what you see in the code is a bad design decision that is currently being reverted. You are applying the same penalty to all the variables, so if they have different scales the penalty would impact them at different force.
