Skip to main content

Module nelder_mead

Module nelder_mead 

Source
Expand description

Bounded Nelder-Mead simplex minimizer.

Derivative-free polish optimizer used after a gradient-based stage to escape stall points. Memo 35 §P2.1 and EG5 establish that, for backgrounded counts-path fits, a single L-BFGS start frequently stalls at the initial guess (1/20 self-flagged convergence on the EG2 S1 C_full regime), while a Nelder-Mead polish from that stall point resolves the failure cleanly (10/20 convergence, density bias from −5.94% to +0.013%, D/DOF from 905 to 1.001).

§Algorithm

Standard Nelder-Mead simplex with reflection / expansion / contraction / shrink (Nelder & Mead 1965), using the classical coefficients (α=1, γ=2, ρ=0.5, σ=0.5).

Box bounds are enforced via reflection at the wall: when a proposed vertex would leave the feasible box, each coordinate is reflected back inside (x_i ← 2·bound − x_i once, then clamped). This preserves the simplex volume in bulk while keeping all vertices feasible.

§Convergence

Terminates when both

  • the maximum coordinate distance from any simplex vertex to the current best vertex (simplex[0]) is below xatol, AND
  • the range of objective values across the simplex is below fatol.

This matches scipy’s optimize.minimize(method='Nelder-Mead') simplex- spread check (max(|sim[i] - sim[0]|) over coordinates) behaviour.

Structs§

NelderMeadConfig
Nelder-Mead configuration.
NelderMeadResult
Nelder-Mead result.

Functions§

nelder_mead_minimize
Minimize a scalar objective with optional per-coordinate box bounds.