Nelder and Mead minimisation algorithm

Direct mimimisation and simulated annealing using the downhill simplex method of Nelder and Mead.

Code adapted from chapter 10 of Numerical Recipes (3rd edition).

Module contents for quippy.simplex:

Classes

DownhillSimplex(func[, x0, deltas, p, args, …]) Multidimensional minimisation using the downhill simplex method of Nelder and Mead.
class quippy.simplex.DownhillSimplex(func, x0=None, deltas=None, p=None, args=None, ftol=1e-06, nmax=5000, tiny=1e-10)[source]

Multidimensional minimisation using the downhill simplex method of Nelder and Mead.

From Numerical Recipes, 3rd edition, section 10.5.

Methods

anneal_step(iter, temperature) Anneal for iter steps at temperature temperature.
extrapolate(ihi, yhi, fac[, temperature]) Extrapolate by a factor fac through the face of the simplex across from the high point ihi, try it, and replace the high point if the new point is better.
minimise() Run the downhill simplex minimiser.
anneal_step(iter, temperature)[source]

Anneal for iter steps at temperature temperature.

Returns True if converged to global minimum, False otherwise.

extrapolate(ihi, yhi, fac, temperature=None)[source]

Extrapolate by a factor fac through the face of the simplex across from the high point ihi, try it, and replace the high point if the new point is better. Returns result of evaluating function at new point.

minimise()[source]

Run the downhill simplex minimiser.

Returns coordinates at minimum as vector x. After minimisation, function value at minimum is available as fmin attribute, simplex as p attribute, and number of function evaluations as nfunc attribute.