[SciPy-User] Eigenvectors of sparse symmetric matrix

Hao Xiong hao@biostat.ucsf....
Mon Oct 25 13:14:16 CDT 2010



>> 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

Thanks, Pauli. Somehow I convinced myself it was otherwise. I have corrected that.

>> 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.

I tried maxiter=100000 and still got zero vectors. I must be missing something.

Regards,
Hao



More information about the SciPy-User mailing list