Module Algostream_advanced_models.Nelder_mead

Derivative-free Nelder-Mead simplex minimizer for small fixed dimensions.

Designed for the n ≤ 4 problems that arise in this codebase (GARCH likelihood, model calibration). For higher-dim or constrained problems, use a real optimization library.

type config = {
  1. max_iter : int;
  2. tol_x : float;
  3. tol_f : float;
  4. alpha : float;
    (*

    reflection coefficient

    *)
  5. gamma : float;
    (*

    expansion coefficient

    *)
  6. rho : float;
    (*

    contraction coefficient

    *)
  7. sigma : float;
    (*

    shrink coefficient

    *)
}
val default_config : config
type result = {
  1. x : float array;
  2. f : float;
  3. iter : int;
  4. converged : bool;
}
val minimize : f:(float array -> float) -> x0:float array -> ?config:config -> unit -> result

Minimize f starting from initial guess x0. The simplex is built by perturbing each coordinate by 5% (or 2.5e-4 if the coordinate is near zero).