2

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 ?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
user1769197
  • 849
  • 2
  • 8
  • 20

1 Answers1

5

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$.

Haitao Du
  • 32,885
  • 17
  • 118
  • 213