简体   繁体   English

Matlab / Octave中的正规方程和pinv()

[英]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.我正在研究机器学习的基础知识,当我阅读有关在 Matlab 中使用正态方程的信息时,我有一个问题。

If the Normal Equation is:如果正规方程是:

And

Is the Pseudo Inverse , so:伪逆,所以:

And pinv(X) compute the pseudo inverse of X .并且pinv(X)计算X的伪逆。

Why, in Matlab/Octave, some people use:为什么,在 Matlab/Octave 中,有些人使用:

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

instead of代替

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

? ?

Is (4) not redundant? (4) 不是多余的吗? doesn't pinv(X) compute the pseudo inverse formula for us? pinv(X)不会为我们计算伪逆公式吗?

Thank you!谢谢!

Has anybody found an answer to this?有人找到答案了吗? Even here under "Implementation" they use (4): http://mlwiki.org/index.php/Normal_Equation#Implementation即使在“实施”下,他们也使用(4): http://mlwiki.org/index.php/Normal_Equation#Implementation

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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