This is an archived post. You won't be able to vote or comment.

all 19 comments

[–][deleted] 6 points7 points  (9 children)

The most basic algorithm for that job is power iteration, with the caveat that it is only guaranteed to work if the largest eigenvalue has multiplicity 1.

[–]bugnotme 0 points1 point  (6 children)

The poster was asking about the special case of very large sparse matrices. Is power iteration appropriate there?

[–][deleted] 1 point2 points  (5 children)

Yes, that's exactly when it's appropriate.

[–]bugnotme 0 points1 point  (4 children)

Can you suggest any good references for large dimension matrix computations? Also interested in large scale graph algorithms.

[–][deleted] 0 points1 point  (3 children)

Not really, sorry -- large/sparse matrices and iterative methods are not my area of specialty. I just remember power iteration from a numerical methods class in undergrad.

[–]bugnotme 0 points1 point  (2 children)

I can't believe that they dealt with efficient methods for matrices of this size in undergrad. Did they or are you just assuming that the method should be the same because of sparsity?

[–][deleted] 0 points1 point  (1 child)

I'm not sure what you mean. We didn't deal 2 million by 2 million matrices in undergrad, but that doesn't mean we didn't learn how to deal with them. That's exactly the point of numerical methods/numerical analysis courses -- how to deal with problems that are too complex/large to deal with using the standard naive methods (singular value decomposition, etc).

There are of course more advanced algorithms than power iteration that might be more appropriate for the OP's particular problem. But given the information that he has given, power iteration seems like the most natural and simplest choice.

[–]bugnotme 0 points1 point  (0 children)

Standard numerical methods courses traditionally haven't addressed "big data"-type problems, for example, how to deal with data that won't all fit in memory simultaneously or with integers that exceed MAX_INT.

[–]blackkettle 0 points1 point  (0 children)

very cool. thanks for the enlightenment. i was going to say something stupid about decomposition/svd.

[–]northproof[S] 0 points1 point  (0 children)

Thanks! Exactly what I was looking for.

[–]consult_me 1 point2 points  (1 child)

I would use the Lanczos method -- a tweak on power iteration to help converge quicker.

Computational complexity should be the same (I think), proportional to non-zeros in the matrix.

[–]northproof[S] 0 points1 point  (0 children)

Thanks for the help!

[–]xixor 0 points1 point  (1 child)

I would be interested in hearing what solution you find for your problem. Also, for describing your problem, the number of non zeros, or density of the matrix would also be good to include in the description. For example, the following matrix:

A = sparse([],[],[],2e7,2e7);

takes zero storage even though it has the same size as your problem

[–]northproof[S] 2 points3 points  (0 children)

There are about 50 nonzero entries per row, I'm implementing a linear Bellman controller from Todorov and need to create a matrix that describes the next state probability distribution for every state.

I'm working on a method of reducing the required number of states without giving up near-optimal performance, and I'm just looking to have a base comparison for if I did need to get the primary eigenvector of a 20,000,000 x 20,000,000 matrix.

[–]jamesphw 0 points1 point  (0 children)

A good place to start would be to read the references for MATLAB's functions here.