minimize(method=’Newton-CG’)#
- scipy.optimize.minimize(fun, x0, args=(), method=None, jac=None, hess=None, hessp=None, bounds=None, constraints=(), tol=None, callback=None, options=None)
Minimization of scalar function of one or more variables using the Newton-CG algorithm.
Note that the jac parameter (Jacobian) is required.
See also
For documentation for the rest of the parameters, see
scipy.optimize.minimize
- Options:
- ——-
- dispbool
Set to True to print convergence messages.
- xtolfloat
Average relative error in solution xopt acceptable for convergence.
- maxiterint
Maximum number of iterations to perform.
- epsfloat or ndarray
If hessp is approximated, use this value for the step size.
- return_allbool, optional
Set to True to return a list of the best solution at each of the iterations.
- c1float, default: 1e-4
Parameter for Armijo condition rule.
- c2float, default: 0.9
Parameter for curvature condition rule.
- workersint, map-like callable, optional
A map-like callable, such as multiprocessing.Pool.map for evaluating any numerical differentiation in parallel. This evaluation is carried out as
workers(fun, iterable)
.Added in version 1.16.0.
Notes
Parameters c1 and c2 must satisfy
0 < c1 < c2 < 1
.