Does anyone know how to perform svd operation on a sparse matrix in python? It seems that there is no such functionality provided in scipy.sparse.linalg.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
You can use the Divisi library to accomplish this; from the home page:
Sounds like sparsesvd is what you're looking for! SVDLIBC efficiently wrapped in Python (no extra data copies made in RAM).
Simply run "easy_install sparsesvd" to install.
A simple example using python-recsys library:
You can try scipy.sparse.linalg.svd, although the documentation is still a work-in-progress and thus rather laconic.