Skip to main content

Module optimize

Module optimize 

Source
Expand description

Minima of functions of several variables over a box: local, and global.

minimize_local walks downhill from a start by the Nelder-Mead simplex, which asks for values only. global_minimum finds the least value over the whole box by branch and bound: each sub-box’s floor is its centre’s value less a Lipschitz constant times its half-diagonal, the box with the lowest floor is split, and the search stops when no floor lies more than the tolerance below the best value found. The constant is estimated from the function’s own slopes, so the certificate holds as far as that estimate does. swarm_minimum is the particle swarm, for a function too rough for a Lipschitz bound to say much.

Structs§

Minimum
A minimum found over a box.

Functions§

global_minimum
The least value of f over the box, to within tolerance, by Lipschitz branch and bound with local polishing.
minimize_local
A local minimum of f near start within the box, by the Nelder-Mead simplex from a first simplex of step along each axis. Points are held to the box.
swarm_minimum
A minimum of f over the box by particle swarm: particles points moving under their own best and the swarm’s best for iterations rounds, from a deterministic scattering, then polished locally. No certificate: the swarm reports the best it saw.