View Single Post
  #2  
Old 07-25-2012, 03:12 PM
yaser's Avatar
yaser yaser is offline
Caltech
 
Join Date: Aug 2009
Location: Pasadena, California, USA
Posts: 1,477
Default Re: Normal equation in linear regression

Quote:
Originally Posted by lorddoskias View Post
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?
pinv is already the pseudo inverse function. When applied to an invertible matrix (in this case X'*X), it returns the regular inverse.
__________________
Where everyone thinks alike, no one thinks very much
Reply With Quote