Registered Member
|
Hello,
I am solving a linear least squares problem, Ax = b, in my code as follows:
I need to calculate a covariance matrix, Inv(A.transpose() * A), for the solution and trying several ways as follows:
I got a solution only in case 1 & case 2, but I got erroneous results for case 3, 4, 5. I learned that using inverse() (case 1) is not a good way and other decomposition methods should be used in the tutorial page: https://eigen.tuxfamily.org/dox-devel/group__TutorialLinearAlgebra.html I learned that case 3,4, 5 have highest accuracy and can be used for all types of matrices, so I cannot understand why these methods don't work for my case. Could you please let me know why I cannot use case 3,4,5 and let me know if there is a criteria how to choose a decomposition method for my case? Thank you very much in advance! |
Moderator
|
Sorry for late reply. In case this still bother you, here is a self-contained example showing all method produces the same result:
So we'll need to get your real matrix entries to reproduce. |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]