Friday, 23 August 2013

Ridge regression in matlab

Ridge regression in matlab

I have this doubt about the ridge regression in matlab. They have
mentioned at http://www.mathworks.com/help/stats/ridge.html, that ridge
regression actually mean centers and make the std equal to 1 for the
predictors. However, I could see that it doesn't. For e.g.
Let my x be
1 1 2
1 3 5
1 9 12
1 12 50
Let my y be
1
2
3
4
It doesn't do any normalization of the xs to 0 mean and unit variance. Any
clarifications what's going on? I mean ridge should do normalization of
the data i.e x to 0 mean and unit variance and then calculate the
coefficients. I was expecting Ridge(y,x,0,0) to give me result of
R=inv(x'*x)*x'y where R takes x and y normalized

No comments:

Post a Comment