Skip to main content

Module optim

Module optim 

Source
Expand description

Nelder–Mead simplex minimizer, a faithful port of R’s nmmin (src/appl/optim.c), which backs optim(method = "Nelder-Mead").

The algorithm is deterministic, so with the same starting point, objective and control constants it reproduces R’s iterate path — and therefore R’s optim result — bit for bit. This is what limma’s genas relies on.

Only the plain (unconstrained, unscaled) Nelder–Mead is ported; parameter scaling (parscale) and the other optim methods are out of scope.

Structs§

NelderMead
Result of nelder_mead, mirroring the parts of R’s optim return value that callers need.

Functions§

nelder_mead
Minimize f starting from x0 using Nelder–Mead with R’s default control constants: reltol = sqrt(f64::EPSILON), abstol = -inf, maxit = 500, reflection alpha = 1, contraction beta = 0.5, expansion gamma = 2.
nelder_mead_with
Nelder–Mead with explicit control constants (see nelder_mead for the defaults). abstol/reltol are R’s optim abstol/reltol.