views:

86

answers:

3

Does anyone know how to perform svd operation on a sparse matrix in python? it seems that their is no such functionality provided in scipy.sparse.linalg.

+1  A: 

You can use the Divisi library to accomplish this; from the home page:

  • It is a library written in Python, using a C library (SVDLIBC) to perform the sparse SVD operation using the Lanczos algorithm. Other mathematical computations are performed by NumPy.
ars
+1  A: 

You can try scipy.sparse.linalg.svd, although the documentation is still a work-in-progress and thus rather laconic.

Vedrana Janković
A: 

Sounds like http://pypi.python.org/pypi/sparsesvd is what you're looking for (just run "easy_install sparsesvd)".

Radim