partial_svd(matrix, n_eigenvecs=None)

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 : tensor

A 2D tensor.

n_eigenvecs : int, optional, default is None

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


U : 2-D tensor, shape (matrix.shape[0], n_eigenvecs)

Contains the right singular vectors

S : 1-D tensor, shape (n_eigenvecs, )

Contains the singular values of matrix

V : 2-D tensor, shape (n_eigenvecs, matrix.shape[1])

Contains the left singular vectors