findmin

# findmin.py
# ------------------------------------------------------------------------------

Module containing a function for finding the minimum of an objective function. 
Lists, tuples and 'd' arrays can be entered as inputs ('d' arrays are used 
internally).

 
Functions
       
nelder_mead(objfunc, point0, spans, trace=False, tolf=1.4901161193847656e-08, tola=1.221338669755462e-77, maxniter=256, rho=1.0, xsi=2.0, gamma=0.5, sigma=0.5)
The Nelder & Mead downhill simplex method is designed to find the minimum 
of an objective function that has a multi-dimensional input, (see for 
instance Lagarias et al. (1998), "Convergence Properties of the Nelder-Mead 
Simplex in Low Dimensions", SIAM J. Optim., Society for Industrial and 
Applied Mathematics Vol. 9, No. 1, pp. 112-147 for details). The algorithm 
is said to first have been presented by Nelder and Mead in Computer Journal,
Vol. 7, pp. 308-313 (1965).
 
The initial simplex must be entered by entering an initial point (an 
array of coordinates), plus an array of spans for the corresponding 
point coordinates.
 
For trace=True a trace is printed to stdout consisting of the present 
number of iterations, the present low value of the objective function, 
the present value of the absolute value of difference between the high and
the low value of the objective function, and the present list of vertices 
of the low value of the objective function = the present "best" point.
 
tolf is the fractional tolerance and tola is the absolute tolerance of 
the absolute value of difference between the high and the low value of 
the objective function.
 
maxniter is the maximum allowed number of iterations.
 
rho, xsi, gamma and sigma are the parameters for reflection, expansion,
contraction and shrinkage, respectively (cf. the references above).

 
Data
        MACHEPS = 2.2204460492503131e-16
SQRTMACHEPS = 1.4901161193847656e-08
SQRTTINY = 1.221338669755462e-77