{ } Raw JSON

bundles / scipy 1.17.1 / scipy / optimize / _trustregion_constr / projections / projections

function

scipy.optimize._trustregion_constr.projections:projections

source: /scipy/optimize/_trustregion_constr/projections.py :295

Signature

def   projections ( A method = None orth_tol = 1e-12 max_refin = 3 tol = 1e-15 )

Summary

Return three linear operators related with a given matrix A.

Parameters

A : sparse array (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 [1]. 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 [1]. 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.

Notes

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

Aliases

  • scipy.optimize._trustregion_constr.equality_constrained_sqp.projections