![]() |
#1
|
|||
|
|||
![]()
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? |
#2
|
||||
|
||||
![]()
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 |
#3
|
|||
|
|||
![]()
Dr. Ng derived the Normal Equation in class, see Lecture 4-6 and he also cautioned about the case where X'*X is non-invertible which meant that there were redundant features (linearly dependent) or too many features (m <= n).
Daniel |
#4
|
||||
|
||||
![]()
Just a small correction on notation. The normal equations for linear regression are
![]() The solution to the normal equations (for ![]() ![]() ![]() where ![]() ![]() ![]()
__________________
Have faith in probability |
#5
|
|||
|
|||
![]()
Thanks you all for useful input. We have some reading to do... :-)
__________________
williamjhone |
![]() |
Thread Tools | |
Display Modes | |
|
|