View Single Post
#4
09-20-2012, 04:24 AM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 595
Re: Normal equation in linear regression

Just a small correction on notation. The normal equations for linear regression are

The solution to the normal equations (for ) is given by the formula that you mention, and indeed the two solutions are equivalent. A proof of this fact is using the singular value decomposition:

and

where and . So,

Quote:
 Originally Posted by lorddoskias From coursera's ML course I've known that the normal equation is calculated as follows: pinv((X'*X))*X'*Y; (octave code) but apparently this is equivalent to just pinv(X)*Y; Can anyone explain why this is the case?
__________________
Have faith in probability