From: Vivek Saxena on 28 Mar 2010 08:58 Hi, Is there a command in MATLAB for performing a generalized ridge regression? Thanks Vivek
From: John D'Errico on 28 Mar 2010 09:21 "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
From: Vivek Saxena on 28 Mar 2010 11:25 "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.
From: Vivek Saxena on 28 Mar 2010 11:34 "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
From: John D'Errico on 28 Mar 2010 12:02
"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 is strongly preferred. This will be considerably more accurate. Next, if you don't have the diagonal matrix, then no, nothing is provided in matlab to divine what you want it to be. John |