bundles / scipy 1.17.1 / scipy / optimize / _optimize / _minimize_cg
function
scipy.optimize._optimize:_minimize_cg
Signature
def _minimize_cg ( fun , x0 , args = () , jac = None , callback = None , gtol = 1e-05 , norm = inf , eps = 1.4901161193847656e-08 , maxiter = None , disp = False , return_all = False , finite_diff_rel_step = None , c1 = 0.0001 , c2 = 0.4 , workers = None , ** unknown_options ) Summary
Minimization of scalar function of one or more variables using the conjugate gradient algorithm.
Parameters
disp: boolSet to True to print convergence messages.
maxiter: intMaximum number of iterations to perform.
gtol: floatGradient norm must be less than
gtolbefore successful termination.norm: floatOrder of norm (Inf is max, -Inf is min).
eps: float or ndarrayIf
jac is Nonethe absolute step size used for numerical approximation of the jacobian via forward differences.return_all: bool, optionalSet to True to return a list of the best solution at each of the iterations.
finite_diff_rel_step: None or array_like, optionalIf
jac in ['2-point', '3-point', 'cs']the relative step size to use for numerical approximation of the jacobian. The absolute step size is computed ash = rel_step * sign(x) * max(1, abs(x)), possibly adjusted to fit into the bounds. Forjac='3-point'the sign ofhis ignored. If None (default) then step is selected automatically.c1: float, default: 1e-4Parameter for Armijo condition rule.
c2: float, default: 0.4Parameter for curvature condition rule.
workers: int, map-like callable, optionalA map-like callable, such as
multiprocessing.Pool.mapfor evaluating any numerical differentiation in parallel. This evaluation is carried out asworkers(fun, iterable).
Notes
Parameters c1 and c2 must satisfy 0 < c1 < c2 < 1.
Aliases
-
scipy.optimize._minimize._minimize_cg