![]() ![]() Matmetically, P * G = I requires inv(G' * G) * G' = P = V * inv(S) * U'. Substituting inv(V * S' * S * V') = inv(V') * inv(S') * inv(S) * inv(V) = V * inv(S) * inv(S') * V' gives P = V * inv(S) * inv(S') * V' * V * S' * U'įinalally, simplifying gives P = V * inv(S) * inv(S') * S' * U' = V * inv(S) * U' ![]() Simplifying gives P = inv(V * S' * S * V') * V * S * U' Substituting G = U * S * V' and G' = V * S' * U' gives P = inv(V * S' * U' * U * S * V') * V * S' * U'. Which produces P = V * inv(S) * U', and since S is diagonal inv(S) = diag(1./diag(S)).Īlternately, you can solve P * G = I with inv(G' * G) * (G' * G) = I meaning P = inv(G' * G) * G'. Note that (by definition) U * U' = I and V * V' = I Right multiply by the inverses of V', S and U (in that order) gives P = I * inv(V') * inv(S) * inv(U) The SVD of G is =svd(G), where G = U * S * V'. Say you want a generalized P such that P * G = I. Yes using least squares and svd is pretty much the same here, I only use svd because I'm trying to do it this way :DĪs a FYI - these should always be the same, at least to within numerical accuracy limits. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |