bundles / scipy 1.17.1 / scipy / optimize / _lsq / common / CL_scaling_vector
function
scipy.optimize._lsq.common:CL_scaling_vector
Signature
def CL_scaling_vector ( x , g , lb , ub ) Summary
Compute Coleman-Li scaling vector and its derivatives.
Extended Summary
Components of a vector v are defined as follows
| ub[i] - x[i], if g[i] < 0 and ub[i] < np.inf v[i] = | x[i] - lb[i], if g[i] > 0 and lb[i] > -np.inf | 1, otherwise
According to this definition v[i] >= 0 for all i. It differs from the definition in paper [1] (eq. (2.2)), where the absolute value of v is used. Both definitions are equivalent down the line. Derivatives of v with respect to x take value 1, -1 or 0 depending on a case.
Returns
v: ndarray with shape of xScaling vector.
dv: ndarray with shape of xDerivatives of v[i] with respect to x[i], diagonal elements of v's Jacobian.
Aliases
-
scipy.optimize._lsq.common.CL_scaling_vector