scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturns
svd(A, eps_or_k, rand=True)

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 :None:None:`eps_or_k`).

See also interp_decomp and id_to_svd .

            <Comment: 
   |value: '..  This function automatically detects the form of the input parameters and\n    passes them to the appropriate backend. For details, see\n    :func:`_backend.iddp_svd`, :func:`_backend.iddp_asvd`,\n    :func:`_backend.iddp_rsvd`, :func:`_backend.iddr_svd`,\n    :func:`_backend.iddr_asvd`, :func:`_backend.iddr_rsvd`,\n    :func:`_backend.idzp_svd`, :func:`_backend.idzp_asvd`,\n    :func:`_backend.idzp_rsvd`, :func:`_backend.idzr_svd`,\n    :func:`_backend.idzr_asvd`, and :func:`_backend.idzr_rsvd`.'
   |>
           

Parameters

A : :class:`numpy.ndarray` or :class:`scipy.sparse.linalg.LinearOperator`

Matrix to be factored, given as either a numpy.ndarray or a scipy.sparse.linalg.LinearOperator with the :None:None:`matvec` and :None:None:`rmatvec` methods (to apply the matrix and its adjoint).

eps_or_k : float or int

Relative error (if :None:None:`eps_or_k < 1`) or rank (if :None:None:`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 type scipy.sparse.linalg.LinearOperator ).

Returns

U : :class:`numpy.ndarray`

Left singular vectors.

S : :class:`numpy.ndarray`

Singular values.

V : :class:`numpy.ndarray`

Right singular vectors.

Compute SVD of a matrix via an ID.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/linalg/interpolative.py#846
type: <class 'function'>
Commit: