[SciPy-User] Eigenvectors of sparse symmetric matrix

Pauli Virtanen pav@iki...
Mon Oct 25 05:03:43 CDT 2010

Sun, 24 Oct 2010 18:42:14 -0700, Hao Xiong wrote:
> I am trying to compute the eigenvectors corresponding to the d+1
> smallest eigenvalues of A=W.T*W. I started with W as a dense matrix and
> then 
> W = sparse.csr_matrix(W)
> A = W.dot(W) # W.T * W

That is W*W and not (W.T)*W

> W,V = eigen_symmetric(A,d+1, which='SM')
> The biggest problem is that the algorithm fails to converge and I get
> all zeros as eigenvectors for a testing dataset. Using dense SVD I got
> the expected results.

You can try playing with setting the maxiter parameter to allow ARPACK to 
spend more iterations on the problem.

Pauli Virtanen

More information about the SciPy-User mailing list