scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturns
evaluate_quadratic(J, g, s, diag=None)

The function is 0.5 * s.T * (J.T * J + diag) * s + g.T * s.

Parameters

J : ndarray, sparse matrix or LinearOperator, shape (m, n)

Jacobian matrix, affects the quadratic term.

g : ndarray, shape (n,)

Gradient, defines the linear term.

s : ndarray, shape (k, n) or (n,)

Array containing steps as rows.

diag : ndarray, shape (n,), optional

Addition diagonal part, affects the quadratic term. If None, assumed to be 0.

Returns

values : ndarray with shape (k,) or float

Values of the function. If s was 2-D, then ndarray is returned, otherwise, float is returned.

Compute values of a quadratic function arising in least squares.

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/_lsq/common.py#325
type: <class 'function'>
Commit: