A : sparse matrix
Array to compute the SVD on, of shape (M, N)
k : int, optional
Number of singular values and vectors to compute.
ncv : integer, optional
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.
which : str, [‘LM’ | ‘SM’], optional
Which k singular values to find:
- ‘LM’ : largest singular values
- ‘SM’ : smallest singular values
New in version 0.12.0.
v0 : ndarray, optional
Starting vector for iteration, of length min(A.shape). Should be an
(approximate) right singular vector if N > M and a right singular vector
otherwise.
New in version 0.12.0.
maxiter: integer, optional :
Maximum number of iterations.
New in version 0.12.0.
return_singular_vectors : bool, optional
Return singular vectors (True) in addition to singular values
New in version 0.12.0.
Returns :
——- :
u : ndarray, shape=(M, k)
Unitary matrix having left singular vectors as columns.
s : ndarray, shape=(k,)
vt : ndarray, shape=(k, N)
Unitary matrix having right singular vectors as rows.
|