Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install sparsesvd

How to install sparsesvd

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install sparsesvd
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.2.1Never BuiltWhy not?
0.1.7 Failed View build log
0.1.6 Failed View build log
0.1.5 Failed View build log
0.1.4 Failed View build log
Windows (64-bit)
0.2.1Never BuiltWhy not?
0.1.7 Failed View build log
0.1.6 Failed View build log
0.1.5 Failed View build log
0.1.4 Failed View build log
Mac OS X (10.5+)
0.1.6
0.2.1Never BuiltWhy not?
0.1.7 Failed View build log
0.1.6 Available View build log
0.1.5 Available View build log
0.1.4 Available View build log
Linux (32-bit)
0.1.6
0.2.1Never BuiltWhy not?
0.1.7 Failed View build log
0.1.6 Available View build log
0.1.5 Available View build log
0.1.4 Available View build log
Linux (64-bit)
0.1.6
0.2.1Never BuiltWhy not?
0.1.7 Failed View build log
0.1.6 Available View build log
0.1.5 Available View build log
0.1.4 Available View build log
0.2.1 Available View build log
 
Author
License
BSD
Dependencies
Depended by
Imports
Lastest release
version 0.2.1 on Jan 9th, 2014

sparsesvd is a Python wrapper around the SVDLIBC library by Doug Rohde, which is itself based on Michael Berry's SVDPACK.

sparsesvd uses SciPy's sparse CSC (Compressed Sparse Column) matrix format as input to SVD. This is the same format used internally by SVDLIBC, so that no extra data copies need to be made by the Python wrapper (memory-efficient).

Installation

In order to install sparsesvd, you'll need NumPy, Scipy and Cython.

Install sparsesvd and its dependencies with:

pip install numpy
pip install scipy
pip install cython
pip install sparsesvd

In case of problems, see http://www.scipy.org/Download for instructions on installing SciPy on various platforms.

If you have instead downloaded and unzipped the source tar.gz package, run:

python setup.py test
sudo python setup.py install

This version has been tested under Python 2.6 and 3.2, but should run on any later versions of both 2.x and 3.x series.

Documentation

The sparsesvd module offers a single function, sparsesvd, which accepts two parameters. One is a sparse matrix in the scipy.sparse.csc_matrix format, the other the number of requested factors (an integer):

>>> import numpy, scipy.sparse
>>> from sparsesvd import sparsesvd
>>> mat = numpy.random.rand(200, 100) # create a random matrix
>>> smat = scipy.sparse.csc_matrix(mat) # convert to sparse CSC format
>>> ut, s, vt = sparsesvd(smat, 100) # do SVD, asking for 100 factors
>>> assert numpy.allclose(mat, numpy.dot(ut.T, numpy.dot(numpy.diag(s), vt)))

Original wrapper by Lubos Kardos, package updated and maintained by Radim Rehurek, Cython and Python 3.x port by Alejandro Pulver. For an application of sparse SVD to Latent Semantic Analysis, see the gensim package.

You can use this code under the simplified BSD license.

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.