Bases: optunity.solvers.util.Solver
Please refer to Nelder-Mead simplex for details about this algorithm.
>>> s = NelderMead(x=1, y=1, xtol=1e-8)
>>> best_pars, _ = s.optimize(lambda x, y: -x**2 - y**2)
>>> [math.fabs(best_pars['x']) < 1e-8, math.fabs(best_pars['y']) < 1e-8]
[True, True]
Initializes the solver with a tuple indicating parameter values.
>>> s = NelderMead(x=1, ftol=2)
>>> s.start
{'x': 1}
>>> s.ftol
2
Warning
This solver is not explicitly constrained. The box constraints that are given are used for initialization, but solver may leave the specified region during iterations. If this is unacceptable, you must manually constrain the domain of the objective function prior to using this solver (cfr. Domain constraints).
Maximizes f.
Parameters: |
|
---|---|
Returns: |
|
Minimizes f.
Parameters: |
|
---|---|
Returns: |
|