scipy.linalg.interpolative.svd¶
-
scipy.linalg.interpolative.svd(A, eps_or_k, rand=True)[source]¶ Compute SVD of a matrix via an ID.
An SVD of a matrix A is a factorization:
A = numpy.dot(U, numpy.dot(numpy.diag(S), V.conj().T))
where U and V have orthonormal columns and S is nonnegative.
The SVD can be computed to any relative precision or rank (depending on the value of eps_or_k).
See also
interp_decompandid_to_svd.Parameters: A :
numpy.ndarrayorscipy.sparse.linalg.LinearOperatorMatrix to be factored, given as either a
numpy.ndarrayor ascipy.sparse.linalg.LinearOperatorwith the matvec and rmatvec methods (to apply the matrix and its adjoint).eps_or_k : float or int
Relative error (if eps_or_k < 1) or rank (if eps_or_k >= 1) of approximation.
rand : bool, optional
Whether to use random sampling if A is of type
numpy.ndarray(randomized algorithms are always used if A is of typescipy.sparse.linalg.LinearOperator).Returns: U :
numpy.ndarrayLeft singular vectors.
S :
numpy.ndarraySingular values.
V :
numpy.ndarrayRight singular vectors.