File: 1-1

package info (click to toggle)
python-scipy 0.7.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,500 kB
  • ctags: 36,081
  • sloc: cpp: 216,880; fortran: 76,016; python: 71,576; ansic: 62,118; makefile: 243; sh: 17
file content (55 lines) | stat: -rw-r--r-- 1,650 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
>>> sp.info(optimize.fmin)
 fmin(func, x0, args=(), xtol=0.0001, ftol=0.0001, maxiter=None, maxfun=None,
      full_output=0, disp=1, retall=0, callback=None)

Minimize a function using the downhill simplex algorithm.

:Parameters:

  func : callable func(x,*args)
      The objective function to be minimized.
  x0 : ndarray
      Initial guess.
  args : tuple
      Extra arguments passed to func, i.e. ``f(x,*args)``.
  callback : callable
      Called after each iteration, as callback(xk), where xk is the
      current parameter vector.

:Returns: (xopt, {fopt, iter, funcalls, warnflag})

  xopt : ndarray
      Parameter that minimizes function.
  fopt : float
      Value of function at minimum: ``fopt = func(xopt)``.
  iter : int
      Number of iterations performed.
  funcalls : int
      Number of function calls made.
  warnflag : int
      1 : Maximum number of function evaluations made.
      2 : Maximum number of iterations reached.
  allvecs : list
      Solution at each iteration.

*Other Parameters*:

  xtol : float
      Relative error in xopt acceptable for convergence.
  ftol : number
      Relative error in func(xopt) acceptable for convergence.
  maxiter : int
      Maximum number of iterations to perform.
  maxfun : number
      Maximum number of function evaluations to make.
  full_output : bool
      Set to True if fval and warnflag outputs are desired.
  disp : bool
      Set to True to print convergence messages.
  retall : bool
      Set to True to return list of solutions at each iteration.

:Notes:

    Uses a Nelder-Mead simplex algorithm to find the minimum of
    function of one or more variables.