scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
projected_cg(H, c, Z, Y, b, trust_radius=inf, lb=None, ub=None, tol=None, max_iter=None, max_infeasible_iter=None, return_all=False)

Solve equality-constrained quadratic programming problem min 1/2 x.T H x + x.t c subject to A x + b = 0 and, possibly, to trust region constraints ||x|| < trust_radius and box constraints lb <= x <= ub .

Notes

Implementation of Algorithm 6.2 on .

In the absence of spherical and box constraints, for sufficient iterations, the method returns a truly optimal result. In the presence of those constraints, the value returned is only a inexpensive approximation of the optimal value.

Parameters

H : LinearOperator (or sparse matrix or ndarray), shape (n, n)

Operator for computing H v .

c : array_like, shape (n,)

Gradient of the quadratic objective function.

Z : LinearOperator (or sparse matrix or ndarray), shape (n, n)

Operator for projecting x into the null space of A.

Y : LinearOperator, sparse matrix, ndarray, shape (n, m)

Operator that, for a given a vector b , compute smallest norm solution of A x + b = 0 .

b : array_like, shape (m,)

Right-hand side of the constraint equation.

trust_radius : float, optional

Trust radius to be considered. By default, uses trust_radius=inf , which means no trust radius at all.

lb : array_like, shape (n,), optional

Lower bounds to each one of the components of x . If lb[i] = -Inf the lower bound for the i-th component is just ignored (default).

ub : array_like, shape (n, ), optional

Upper bounds to each one of the components of x . If ub[i] = Inf the upper bound for the i-th component is just ignored (default).

tol : float, optional

Tolerance used to interrupt the algorithm.

max_iter : int, optional

Maximum algorithm iterations. Where max_inter <= n-m . By default, uses max_iter = n-m .

max_infeasible_iter : int, optional

Maximum infeasible (regarding box constraints) iterations the algorithm is allowed to take. By default, uses max_infeasible_iter = n-m .

return_all : bool, optional

When true , return the list of all vectors through the iterations.

Returns

x : array_like, shape (n,)

Solution of the EQP problem.

info : Dict

Dictionary containing the following:

Solve EQP problem with projected CG method.

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/qp_subproblem.py#411
type: <class 'function'>
Commit: