简体   繁体   中英

Normal Equation and pinv() in Matlab/Octave

I'm studing the fundamentals of Machine Learning and, when I was reading about the use of Normal Equation in Matlab, I had a question.

If the Normal Equation is:

And

Is the Pseudo Inverse , so:

And pinv(X) compute the pseudo inverse of X .

Why, in Matlab/Octave, some people use:

theta = pinv(X'*X)*X'*y ...(4)

instead of

theta = pinv(X)*y ...(5)

?

Is (4) not redundant? doesn't pinv(X) compute the pseudo inverse formula for us?

Thank you!

Has anybody found an answer to this? Even here under "Implementation" they use (4): http://mlwiki.org/index.php/Normal_Equation#Implementation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM