I don't understand RidgeCV's fit_intercept, and how to use it for my data Alright, I have an assignment that makes me calculate weights for a function with different terms. At first, I thought I might just leave the weight for the term $1$ out, and instead use the intercept. I have decided to use RidgeCV, as I had a large amount of multicolinearity.

However, now I have appended my $x$ by a row of $1$'s, and did the following:

RidgeCV(fit_intercept = False).fit(x, y)


Alright, now I have an array of weights. For comparison, I have tried also

RidgeCV(fit_intercept = True).fit(x, y)


As expected, the weight for $1$ became 0. However, all other values changed too - and the intercept is different from the weight for $1$ from before. I have also a different .score() - the first one is higher.

Why is that the case? I thought all fit_intercept was doing is adding a row of $1$ to my $x$, which obviously can't be true. Also, should I try centering my data myself, or is that now unnecessary?
The weight on the constant column was also penalized by Ridge, whereas the intercept fitted directly is not.

To your second question: Centering shouldn't be necessary (except maybe for computational reasons), though scaling is still recommended so that coefficient penalties are applied more equally.