Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Module « scipy.linalg.interpolative »

Fonction svd - module scipy.linalg.interpolative

Signature de la fonction svd

def svd(A, eps_or_k, rand=True, rng=None) 

Description

help(scipy.linalg.interpolative.svd)

Compute SVD of a matrix via an ID.

An SVD of a matrix `A` is a factorization::

    A = U @ np.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 :func:`interp_decomp` and :func:`id_to_svd`.

..  This function automatically detects the form of the input parameters and
    passes them to the appropriate backend. For details, see
    :func:`_backend.iddp_svd`, :func:`_backend.iddp_asvd`,
    :func:`_backend.iddp_rsvd`, :func:`_backend.iddr_svd`,
    :func:`_backend.iddr_asvd`, :func:`_backend.iddr_rsvd`,
    :func:`_backend.idzp_svd`, :func:`_backend.idzp_asvd`,
    :func:`_backend.idzp_rsvd`, :func:`_backend.idzr_svd`,
    :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 :class:`numpy.ndarray` or a
    :class:`scipy.sparse.linalg.LinearOperator` with 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 :class:`numpy.ndarray`
    (randomized algorithms are always used if `A` is of type
    :class:`scipy.sparse.linalg.LinearOperator`).
rng : `numpy.random.Generator`, optional
    Pseudorandom number generator state. When `rng` is None, a new
    `numpy.random.Generator` is created using entropy from the
    operating system. Types other than `numpy.random.Generator` are
    passed to `numpy.random.default_rng` to instantiate a ``Generator``.
    If `rand` is ``False``, the argument is ignored.

Returns
-------
U : :class:`numpy.ndarray`
    2D array of left singular vectors.
S : :class:`numpy.ndarray`
    1D array of singular values.
V : :class:`numpy.ndarray`
    2D array right singular vectors.


Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé