bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / optimize / _tnc / _minimize_tnc
function
scipy.optimize._tnc:_minimize_tnc
source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_tnc.py:285
Signature
def _minimize_tnc(fun, x0, args = (), jac = None, bounds = None, eps = 1e-08, scale = None, offset = None, mesg_num = None, maxCGit = -1, eta = -1, stepmx = 0, accuracy = 0, minfev = 0, ftol = -1, xtol = -1, gtol = -1, rescale = -1, disp = False, callback = None, finite_diff_rel_step = None, maxfun = None, workers = None, **unknown_options)Summary
Minimize a scalar function of one or more variables using a truncated Newton (TNC) algorithm.
Parameters
eps: float or ndarrayIf
jac is Nonethe absolute step size used for numerical approximation of the jacobian via forward differences.scale: list of floatsScaling factors to apply to each variable. If None, the factors are up-low for interval bounded variables and 1+|x] for the others. Defaults to None.
offset: floatValue to subtract from each variable. If None, the offsets are (up+low)/2 for interval bounded variables and x for the others.
disp: boolSet to True to print convergence messages.
maxCGit: intMaximum number of hessian*vector evaluations per main iteration. If maxCGit == 0, the direction chosen is -gradient if maxCGit < 0, maxCGit is set to max(1,min(50,n/2)). Defaults to -1.
eta: floatSeverity of the line search. If < 0 or > 1, set to 0.25. Defaults to -1.
stepmx: floatMaximum step for the line search. May be increased during call. If too small, it will be set to 10.0. Defaults to 0.
accuracy: floatRelative precision for finite difference calculations. If <= machine_precision, set to sqrt(machine_precision). Defaults to 0.
minfev: floatMinimum function value estimate. Defaults to 0.
ftol: floatPrecision goal for the value of f in the stopping criterion. If ftol < 0.0, ftol is set to 0.0 defaults to -1.
xtol: floatPrecision goal for the value of x in the stopping criterion (after applying x scaling factors). If xtol < 0.0, xtol is set to sqrt(machine_precision). Defaults to -1.
gtol: floatPrecision goal for the value of the projected gradient in the stopping criterion (after applying x scaling factors). If gtol < 0.0, gtol is set to 1e-2 * sqrt(accuracy). Setting it to 0.0 is not recommended. Defaults to -1.
rescale: floatScaling factor (in log10) used to trigger f value rescaling. If 0, rescale at each iteration. If a large value, never rescale. If < 0, rescale is set to 1.3.
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. Formethod='3-point'the sign ofhis ignored. If None (default) then step is selected automatically.maxfun: intMaximum number of function evaluations. If None,
maxfunis set to max(100, 10*len(x0)). Defaults to None.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).
Aliases
scipy.optimize._minimize._minimize_tnc