Registered Member
|
Hi,
I've got a dense matrix of doubles 5000x500,000, and I'd like to get its first singular value. I don't need the singular vectors. Currently I'm using
which takes something like 40min on a 2Ghz Intel Xeon (gcc 4.6, -O3, -DNDEBUG). Are there any "shortcuts" to speed it up? Thanks |
Moderator
|
JacobiSVD is not designed for such large matrices. Since you only want the largest one, you might compute A = X X^T and extract its largest eigenvalue implementing Power iterations (4 lines of code) or using Eigen's interface to ARPACK (in de devel branch, in unsupported/Eigen/ folder).
|
Registered Member
|
Thanks, I found viewtopic.php?f=74&t=108033 which implements power iterations.
The ARPACK support doesn't seem to build on the latest devel, the code looks for ArpackGeneralizedSelfAdjointEigenSolver.h, but the file is actually called ArpackSelfAdjointEigenSolver.h. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]