nelderMeadModify#

lsst.ts.wep.deblend.nelderMeadModify(func, x_start, args=(), step=0.1, no_improve_thr=1e-05, no_improv_break=10, max_iter=0, alpha=1.0, gamma=2.0, rho=-0.5, sigma=0.5)#

Optimization of the Nelder-Mead algorithm.

Parameters:
  • func (callable) – Function to optimize, must return a scalar score and operate over a numpy array of the same dimensions as x_start.

  • x_start (numpy.ndarray) – Initial position.

  • args (tuple, optional) – Additional arguments required by func. (the default is ().)

  • step (float, optional) – Look-around radius in initial step (the default is 0.1.)

  • no_improve_thr (float, optional) – Break after no_improv_break iterations with an improvement lower than no_improv_thr (the default is 10e-6.)

  • no_improv_break (int, optional) – Break after no_improv_break iterations with an improvement lower than no_improv_thr (the default is 10.)

  • max_iter (int, optional) – Always break after this number of iterations. Set it to 0 to loop indefinitely (the default is 0.)

  • alpha (float, optional) – Reflection parameter of the algorithm. (the default is 1.)

  • gamma (float, optional) – Expansion parameter of the algorithm. (the default is 2.)

  • rho (float, optional) – Contraction parameter of the algorithm. (the default is -0.5.)

  • sigma (float, optional) – Reduction parameter of the algorithm (the default is 0.5.)

Returns:

Best parameter array and best score for the evaluated function.

Return type:

tuple