Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab - calculating max eigenvalue of a big sparse (A'*A) matrix

I have a big (400K*400K) sparse matrix and I need to calculate the largest eigenvalue of A'*A.

The problem is that Matlab can't even calculate A' due to memory problems.
I also tried [a,b,c] = find(A) and then transpose by creating a transpose sparse matrix, but although the find() works, the sprase creation doesn't.

Is there a nice solution for this? it can be either in a matlab function or in another technique to calculate the largest eigenvalue for this kind of multiplication.

Thanks.

like image 979
yoki Avatar asked Oct 21 '22 20:10

yoki


1 Answers

If A is sparse, see this thread and some discussion in this documentation (basically do it part by part) for a way to transpose it etc.

But now you need to calculate B=A'*A. The question is, is it still sparse? assuming it is, there shouldn't be a problem to proceed using the previous technique mentioned in the link.

Then after you've obtained B=A'*A, use eigs

eigs(B,1)

to obtain the largest magnitude eigenvalue.

like image 150
bla Avatar answered Oct 27 '22 18:10

bla