bundles / scipy 1.17.1 / scipy / optimize / _lsq / common / build_quadratic_1d
function
scipy.optimize._lsq.common:build_quadratic_1d
Signature
def build_quadratic_1d ( J , g , s , diag = None , s0 = None ) Summary
Parameterize a multivariate quadratic function along a line.
Extended Summary
The resulting univariate quadratic function is given as follows
f(t) = 0.5 * (s0 + s*t).T * (J.T*J + diag) * (s0 + s*t) + g.T * (s0 + s*t)
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 (n,)Direction vector of a line.
diag: None or ndarray with shape (n,), optionalAddition diagonal part, affects the quadratic term. If None, assumed to be 0.
s0: None or ndarray with shape (n,), optionalInitial point. If None, assumed to be 0.
Returns
a: floatCoefficient for t**2.
b: floatCoefficient for t.
c: floatFree term. Returned only if
s0is provided.
Aliases
-
scipy.optimize._lsq.common.build_quadratic_1d