SVD computation time question
3 views (last 30 days)
Show older comments
weyronndsb000
on 29 Apr 2024
Answered: Christine Tobler
on 29 Apr 2024
I'm measuring computation time of matrix factorization methods for wide matrices with increasing number of columns.
I don't understand why SVD computation time starts growing very sharply between the 25th and 30th iteration. I'm using the built-in svd() function, so my guess would be that for larger matrices there is another method used for computing SVD.
I'm not sure if this is the right reason so I'm checking here if anyone can confirm or if there is anything else to it.
0 Comments
Accepted Answer
Christine Tobler
on 29 Apr 2024
I'm not sure what causes the sharp change between iterations - I can reproduce roughly similar timings when I call svd with 3 outputs, not using the "econ" mode.
For this size of inputs, most time will be spent on computing the third output matrix, so quadratic time increase should be expected with the number of iterations. I do not believe there are different algorithms are used here, but different block sizes for splitting up the problem might be part of the reason her, or also some hardware-dependent memory or cache effects.
If it's possible to do your computation using the economy mode output of SVD, this would likely improve performance significantly.
0 Comments
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!