根據 sdvsvsdav 嘅神邏輯: 用 QR decomposition = 計 inv(gram(X)) 再乘返埋. 然後小妹就 prove 俾你睇有咩唔同:
X = QR
Gram(X) = t(X)*X = t(QR)*(QR) = t(R)*R
inv(Gram(X)) = (t(R)*(R))^{-1}
事實我地係
冇計 inv(Gram(X)) 呢個 matrix
反而直接 plug 落去
Gram(X)*b = t(X)*y
t(R)*(R)*b = t(R)*t(Q)*y
R*b = t(Q)*y
你係
唔需要計 R 嘅 inverse, 而係 forward substitution.
sdvsvsdav 係咪真係以為要計 inverse matrix 咁 on9? 真係 undergrad 冇讀 numerical methods?
不如你教下我 inverse matrix 計咗係邊啦