partial_svd(matrix, n_eigenvecs=None)[source]

Computes a fast partial SVD on matrix

if n_eigenvecs is specified, sparse eigendecomposition is used on either matrix.dot(matrix.T) or matrix.T.dot(matrix)

matrix : 2D-array

n_eigenvecs : int, optional, default is None

if specified, number of eigen[vectors-values] to return


U : 2D-array

of shape (matrix.shape[0], n_eigenvecs) contains the right singular vectors

S : 1D-array

of shape (n_eigenvecs, ) contains the singular values of matrix

V : 2D-array

of shape (n_eigenvecs, matrix.shape[1]) contains the left singular vectors