class_docstr: .. include:: /global.rst
  
  Please refer to |nelder-mead| for details about this algorithm.
  
  >>> s = NelderMead(x=1, y=1, xtol=1e-8) #doctest:+SKIP
  >>> best_pars, _ = s.optimize(lambda x, y: -x**2 - y**2) #doctest:+SKIP
  >>> [math.fabs(best_pars['x']) < 1e-8, math.fabs(best_pars['y']) < 1e-8]  #doctest:+SKIP
  [True, True]
class_docstr_tok: ["..","include",":",":","\/global.rst","Please","refer","to","|nelder-mead|","for","details","about","this","algorithm",".",">",">",">","s","=","NelderMead","(","x=1",",","y=1",",","xtol=1e-8",")","#","doctest",":","+SKIP",">",">",">","best_pars",",","_","=","s.optimize","(","lambda","x",",","y",":","-x","*","*","2","-","y","*","*","2",")","#","doctest",":","+SKIP",">",">",">","[","math.fabs","(","best_pars","[","'","x","'","]",")","<","1e-8",",","math.fabs","(","best_pars","[","'","y","'","]",")","<","1e-8","]","#","doctest",":","+SKIP","[","True",",","True","]"]
docstr: Initializes the solver with a tuple indicating parameter values.
  
  >>> s = NelderMead(x=1, ftol=2) #doctest:+SKIP
  >>> s.start #doctest:+SKIP
  {'x': 1}
  >>> s.ftol #doctest:+SKIP
  2
  
  .. warning:: |warning-unconstrained|
docstr_tok: ["Initializes","the","solver","with","a","tuple","indicating","parameter","values",".",">",">",">","s","=","NelderMead","(","x=1",",","ftol=2",")","#","doctest",":","+SKIP",">",">",">","s.start","#","doctest",":","+SKIP","{","'","x","'",":","1","}",">",">",">","s.ftol","#","doctest",":","+SKIP","2","..","warning",":",":","|warning-unconstrained|"]
code: def __init__(self, ftol=1e-4, max_iter=None, **kwargs):
      """Initializes the solver with a tuple indicating parameter values.
  
      >>> s = NelderMead(x=1, ftol=2) #doctest:+SKIP
      >>> s.start #doctest:+SKIP
      {'x': 1}
      >>> s.ftol #doctest:+SKIP
      2
  
      .. warning:: |warning-unconstrained|
  
      """
  
      self._start = kwargs
      self._ftol = ftol
      self._max_iter = max_iter
      if max_iter is None:
          self._max_iter = len(kwargs) * 200
  
file_path: optunity/optunity/solvers/NelderMead.py
imports: import array
  import operator
  from ..None import functions
  from .solver_registry import register_solver
  from .util import Solver, _copydoc
  from .None import util
label_desc: Use image node_id 1 to create a new NelderMead object from inherited base classes: Solver with example: obj = NelderMead(ftol, max_iter)