scipy.sparse.linalg.svds

scipy.sparse.linalg.svds(A, k=6, ncv=None, tol=0)[source]

Compute the largest k singular values/vectors for a sparse matrix.

Parameters :

A : sparse matrix

Array to compute the SVD on

k : int, optional

Number of singular values and vectors to compute.

ncv : integer

The number of Lanczos vectors generated ncv must be greater than k+1 and smaller than n; it is recommended that ncv > 2*k

tol : float, optional

Tolerance for singular values. Zero (default) means machine precision.

Notes

This is a naive implementation using an ARPACK as eigensolver on A.H * A or A * A.H, depending on which one is more efficient.

Previous topic

scipy.sparse.linalg.lobpcg

Next topic

scipy.sparse.linalg.splu