Ridge regression y=a1*x1+a2*x2+a3*x3+C

8 views (last 30 days)
rabbahs
rabbahs on 24 Nov 2013
Commented: rabbahs on 25 Nov 2013
hi, I want to calculate the coefficient of equation using Ridge regression according to the following equation, y=a1*x1+a2*x2+a3*x3+C C is a constant i am using the command, a=ridge(y,[1 x1 x2 x3],0.5)
when I try to regenerate y using the coefficient and the x's it is not giving me the same values. Although the trend is looking same but values are scaled up. The data file containing y,x1,x2,x3 are attached. Please have a look and give me you expert opinion. I will be very thankful to you. SSR

Accepted Answer

dpb
dpb on 24 Nov 2013
From
help ridge
"B1 = ridge(Y,X,K) returns ... regression coefficients...
... The results are computed after centering and scaling
the X columns so they have mean 0 and standard deviation 1."
It goes on to point out that to avoid using the scaling internally, add a fourth argument
doc ridge
for details.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!