From: Bruno Luong on
"John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <honuht$hlh$1(a)fred.mathworks.com>...
> "Vivek Saxena" <maverick280857(a)yahoo.com> wrote in message <honstg$nmo$1(a)fred.mathworks.com>...
> > "Vivek Saxena" <maverick280857(a)yahoo.com> wrote in message <honsd4$gme$1(a)fred.mathworks.com>...
> > > "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <honl42$4qb$1(a)fred.mathworks.com>...
> > > > "Vivek Saxena" <maverick280857(a)yahoo.com> wrote in message <honjot$f3c$1(a)fred.mathworks.com>...
> > > > > Hi,
> > > > >
> > > > > Is there a command in MATLAB for performing a generalized ridge regression?
> > > >
> > > > Yes. Use backslash.
> > > >
> > > > help slash
> > > >
> > > > All you need to do is to define the matrices.
> > > >
> > > > John
> > >
> > > John, does this give a solution to
> > >
> > > (X'X + Lambda)Y = X'Y
> > >
> > > where Lambda is a diagonal matrix, with unequal diagonal entries? I need the entries of the Lamdba matrix using a process similar to the ridge trace method. I do not have Lambda apriori.
> >
> > Correction:
> >
> > (X'X + Lambda)Z = X'Y
>
> You asked if matlab can perform a generalized ridge
> regression.
>
> First of all, do NOT do it by solving this form:
>
> > (X'X + Lambda)Z = X'Y
>
> Instead, use of the form:
>
> [X;sqrt(Lambda)]\Y

John, I'm sure you wanted to write

[X;sqrt(Lambda)]\[Y;0]

Bruno
From: Ambarish Jash on
Hi Vivek try the function ridge, if you want to implement a linear ridge regression. If you want a kernel version of ridge regression you can download it from my mathworks page.