Skip to main content

Module global

Module global 

Source
Expand description

Global optimisation of functions with many local minima, following scipy.optimize: basin hopping (basinhopping), generalised simulated annealing with local search (dual_annealing), and the deterministic DIRECT algorithm (direct, the locally biased DIRECT-L variant that is SciPy’s default).

See the book entry Assignment, trust regions and global optimisation.

Structs§

BasinhoppingOptions
Options for basinhopping (SciPy’s defaults).
DirectOptions
Options for direct (SciPy’s defaults; max_fun defaults to 1000 n).
DualAnnealingOptions
Options for dual_annealing (SciPy’s defaults).
GlobalResult
The result of a global optimisation.

Functions§

basinhopping
Basin hopping (Wales and Doye, 1997; SciPy’s basinhopping): a random walk on the local minima. Each step displaces the current minimum uniformly by up to stepsize in every coordinate, minimises locally (L-BFGS-B with finite differences), and accepts the new minimum by the Metropolis rule exp(−(f_new − f_old)/T) > u. Every interval steps the step size is divided (or multiplied) by stepwise_factor if the acceptance rate is above (below) the target. Returns the lowest minimum seen.
direct
DIRECT, “DIviding RECTangles” (Jones, Perttunen and Stuckman, 1993), in Gablonsky and Kelley’s locally biased form DIRECT-L. The domain is scaled to the unit cube and covered by boxes, each evaluated at its centre. Each iteration selects the potentially optimal boxes, those on the lower-right convex hull of (size, value), one per size, whose value could be the lowest for some Lipschitz constant K with a gain of at least ε |f_min|. Each selected box is trisected along its longest sides, the side whose new centres give the lowest value first. No gradients, no randomness: the search balances global exploration (large boxes) against local refinement.
dual_annealing
Dual annealing (Xiang et al., 1997; SciPy’s dual_annealing): generalised simulated annealing whose heavy-tailed Tsallis visiting distribution makes long jumps likely at high temperature, with the temperature falling as T(t) = T₀ (2^{q_v−1} − 1)/((1 + t)^{q_v−1} − 1), acceptance of uphill moves with probability [1 − (1 − q_a) ΔE/T]^{1/(1−q_a)}, a local L-BFGS-B search whenever the best point improves (or nothing has improved for a long time), and re-annealing from a random point once the temperature falls below restart_temp_ratio · T₀.