Expand description
Optimization: one-variable searches and the Nelder–Mead simplex.
Structs§
- Minimum
- The result of
nelder_mead: the best point found, its value, the number of simplex moves made and whether the tolerance was met. - Nelder
Mead - Options for
nelder_mead.
Functions§
- brent
- Minimizes
fon[a, b]by Brent’s method: parabolic interpolation through the three best points when it lands inside the bracket and shrinks it, golden-section steps otherwise (Brent, Algorithms for Minimization without Derivatives, 1973, ch. 5). Stops when the bracket is withintol(relative, plus a tiny absolute floor) of the best point, and returns(x, f(x), evaluations). Near a minimumfis flat to second order, soxis only determined to about√εrelative, andtolbelow that is raised to it. - golden_
section - Minimizes a unimodal
fon[a, b]by golden-section search, to the width of1e-15relative tob. - minimize
- Minimizes
fon the open interval(lo, hi): a scan of 64 equal cells picks the best interior grid point, then golden-section search runs between its neighbours to full precision. - nelder_
mead - Minimizes
ffrom the start pointx0by the Nelder–Mead simplex method, with the standard moves: reflection 1, expansion 2, contraction 1/2 (outside or inside) and shrink 1/2 toward the best vertex (Nelder and Mead, 1965; Lagarias et al., 1998).