bundles / scipy latest / scipy / optimize / _lsq / common / evaluate_quadratic
function
scipy.optimize._lsq.common:evaluate_quadratic
Signature
def evaluate_quadratic ( J , g , s , diag = None ) Summary
Compute values of a quadratic function arising in least squares.
Extended Summary
The function is 0.5 * s.T * (J.T * J + diag) * s + g.T * s.
Parameters
J: ndarray, sparse array 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,), optionalAddition diagonal part, affects the quadratic term. If None, assumed to be 0.
Returns
values: ndarray with shape (k,) or floatValues of the function. If
swas 2-D, then ndarray is returned, otherwise, float is returned.
Aliases
-
scipy.optimize._lsq.common.evaluate_quadratic