This forum has been archived. All content is frozen. Please use KDE Discuss instead.

svd help

Tags: None
(comma "," separated)
sfhaider
Registered Member
Posts
3
Karma
0
OS

svd help

Thu Nov 05, 2009 12:29 pm
I get the following error if i use a large matrix

#include </home/syed/eigen2/Eigen/Core>
#include </home/syed/eigen2/Eigen/Array>
#include </home/syed/eigen2/Eigen/LU>
using namespace Eigen;
int main () {

MatrixXf A = MatrixXf::Random(150000,4000);
VectorXf b = VectorXf::Random(150000);
VectorXf x;
A.lu().solve(b, &x);

}


terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)

Beside, for a matrix of size 15000 x 4000, it kept running for more than 1 hr and i killed it
How long does it take to run SVD for larger matrices. Well, i am using a regular old PC P4 2.8 GhZ
FMD
Registered Member
Posts
25
Karma
0

Re: svd help

Thu Nov 05, 2009 5:46 pm
Ummh...

150000 x 4000 = 6x10^8 Doubles = 4.47 GByte.
This will take a while.... 8)
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: svd help

Thu Nov 05, 2009 6:49 pm
yep, for matrices of this size, the only way it can terminate in reasonable time is if that's sparse matrices, and we don't do sparse svd, so, you need to look for another library! Sorry.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]