I'm trying to figure out if there is a faster way to compute all the eigenvalues and eigenvectors of a very big and sparse adjacency matrix than using scipy.sparse.linalg.eigsh As far as I know, this methods only uses the sparseness and symmetry attributes of the matrix. An adjacency matrix is also binary, what makes me think there is a faster way to do it.
I created a random 1000x1000 sparse adjacency matrix, and compared between several methods on my x230 ubuntu 13.04 laptop:
- scipy.sparse.linalg.eigs: 0.65 seconds
- scipy.sparse.linalg.eigsh: 0.44 seconds
- scipy.linalg.eig: 6.09 seconds
- scipy.linalg.eigh: 1.60 seconds
With the sparse eigs and eigsh, I set k, the number of the desired eigenvalues and eigenvectors, to be the rank of the matrix.
The problem starts with bigger matrices - on a 9000x9000 matrix, it took scipy.sparse.linalg.eigsh 45 minutes!