scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
projections(A, method=None, orth_tol=1e-12, max_refin=3, tol=1e-15)

Notes

Uses iterative refinements described in [1] during the computation of Z in order to cope with the possibility of large roundoff errors.

Parameters

A : sparse matrix (or ndarray), shape (m, n)

Matrix A used in the projection.

method : string, optional

Method used for compute the given linear operators. Should be one of:

  • 'NormalEquation': The operators

    will be computed using the so-called normal equation approach explained in . In order to do so the Cholesky factorization of (A A.T) is computed. Exclusive for sparse matrices.

  • 'AugmentedSystem': The operators

    will be computed using the so-called augmented system approach explained in . Exclusive for sparse matrices.

  • 'QRFactorization': Compute projections

    using QR factorization. Exclusive for dense matrices.

  • 'SVDFactorization': Compute projections

    using SVD factorization. Exclusive for dense matrices.

orth_tol : float, optional

Tolerance for iterative refinements.

max_refin : int, optional

Maximum number of iterative refinements.

tol : float, optional

Tolerance for singular values.

Returns

Z : LinearOperator, shape (n, n)

Null-space operator. For a given vector x , the null space operator is equivalent to apply a projection matrix P = I - A.T inv(A A.T) A to the vector. It can be shown that this is equivalent to project x into the null space of A.

LS : LinearOperator, shape (m, n)

Least-squares operator. For a given vector x , the least-squares operator is equivalent to apply a pseudoinverse matrix pinv(A.T) = inv(A A.T) A to the vector. It can be shown that this vector pinv(A.T) x is the least_square solution to A.T y = x .

Y : LinearOperator, shape (n, m)

Row-space operator. For a given vector x , the row-space operator is equivalent to apply a projection matrix Q = A.T inv(A A.T) to the vector. It can be shown that this vector y = Q x the minimum norm solution of A y = x .

Return three linear operators related with a given matrix A.

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/optimize/_trustregion_constr/projections.py#289
type: <class 'function'>
Commit: