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

funccallable

Function to optimize, must return a scalar score and operate over a numpy array of the same dimensions as x_start.

x_startnumpy.ndarray

Initial position.

argstuple, optional

Additional arguments required by func. (the default is ().)

stepfloat, optional

Look-around radius in initial step (the default is 0.1.)

no_improve_thrfloat, optional

Break after no_improv_break iterations with an improvement lower than no_improv_thr (the default is 10e-6.)

no_improv_breakint, optional

Break after no_improv_break iterations with an improvement lower than no_improv_thr (the default is 10.)

max_iterint, optional

Always break after this number of iterations. Set it to 0 to loop indefinitely (the default is 0.)

alphafloat, optional

Reflection parameter of the algorithm. (the default is 1.)

gammafloat, optional

Expansion parameter of the algorithm. (the default is 2.)

rhofloat, optional

Contraction parameter of the algorithm. (the default is -0.5.)

sigmafloat, optional

Reduction parameter of the algorithm (the default is 0.5.)

Returns

tuple

Best parameter array and best score for the evaluated function.