minimize(fun, x0, args=(), *, method, tol=None, options=None)¶
Minimization of scalar function of one or more variables.
This API for this function matches SciPy with some minor deviations:
funare calculated automatically using JAX’s autodiff support when required.
methodargument is required. You must specify a solver.
Various optional arguments in the SciPy interface have not yet been implemented.
Optimization results may differ from SciPy due to differences in the line search implementation.
jitcompilation. It does not yet support differentiation or arguments in the form of multi-dimensional arrays, but support for both is planned.
Callable) – the objective function to be minimized,
fun(x, *args) -> float, where
xis a 1-D array with shape
argsis a tuple of the fixed parameters needed to completely specify the function.
funmust support differentiation.
ndarray) – initial guess. Array of real elements of size
nis the number of independent variables.
Tuple) – extra arguments passed to the objective function.
str) – solver type. Currently only
a dictionary of solver options. All methods accept the following generic options:
maxiter (int): Maximum number of iterations to perform. Depending on the method each iteration may use several function evaluations.
- Return type