2
$\begingroup$

This question already has an answer here:

I am trying to determine what is the purpose of including the intercept term in ridge regression.

In what situations should I include the intercept term ?

And in what situations should I not include the intercept term in ridge regression ?

$\endgroup$

marked as duplicate by kjetil b halvorsen, Peter Flom - Reinstate Monica Nov 26 '18 at 10:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5
$\begingroup$

Ridge regression is similar to multiple regression. The only difference is adding the L2 regularization to objective.

Therefore, this post answers your question well: When is it ok to remove the intercept in a linear regression model?

In most cases, it is better to include intercept term, and more importantly, the regularization usually does not apply on the intercept..

The only reason we want to remove the intercept term is that we need $y=0$ when $\mathbf x = \mathbf 0$.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.