minimize(method=’TNC’)¶

scipy.optimize.minimize(fun, x0, args=(), method='TNC', jac=None, bounds=None, tol=None, callback=None, options={'eps': 1e-08, 'scale': None, 'offset': None, 'mesg_num': None, 'maxCGit': -1, 'maxiter': None, 'eta': -1, 'stepmx': 0, 'accuracy': 0, 'minfev': 0, 'ftol': -1, 'xtol': -1, 'gtol': -1, 'rescale': -1, 'disp': False})

Minimize a scalar function of one or more variables using a truncated Newton (TNC) algorithm.

For documentation for the rest of the parameters, see scipy.optimize.minimize

Options
epsfloat

Step size used for numerical approximation of the jacobian.

scalelist of floats

Scaling factors to apply to each variable. If None, the factors are up-low for interval bounded variables and 1+|x] fo the others. Defaults to None

offsetfloat

Value to subtract from each variable. If None, the offsets are (up+low)/2 for interval bounded variables and x for the others.

dispbool

Set to True to print convergence messages.

maxCGitint

Maximum 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.

maxiterint

Maximum number of function evaluation. if None, maxiter is set to max(100, 10*len(x0)). Defaults to None.

etafloat

Severity of the line search. if < 0 or > 1, set to 0.25. Defaults to -1.

stepmxfloat

Maximum step for the line search. May be increased during call. If too small, it will be set to 10.0. Defaults to 0.

accuracyfloat

Relative precision for finite difference calculations. If <= machine_precision, set to sqrt(machine_precision). Defaults to 0.

minfevfloat

Minimum function value estimate. Defaults to 0.

ftolfloat

Precision goal for the value of f in the stopping criterion. If ftol < 0.0, ftol is set to 0.0 defaults to -1.

xtolfloat

Precision 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.

gtolfloat

Precision 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.

rescalefloat

Scaling 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.

Previous topic

minimize(method=’L-BFGS-B’)

Next topic

minimize(method=’COBYLA’)