Nelder-Mead 알고리즘
scipy.optimize.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)
매개변수 설명
- func: 최적화시킬 함수
- xo: 초기값
- args: 최적화 함수에 전달할 추가 매개변수
- xtol: 이동 스텝
- ftol: 수렴 판정 기준
- maxiter: 최대 반복 회수
- maxfun: 최대 함수호출 회수
- full_output : non-zero if fval and warnflag outputs are desired.
- disp : non-zero to print convergence messages.
- retall : non-zero to return list of solutions at each iteration
- callback : an optional user-supplied function to call after each iteration. It is called as callback(xk), where xk is the current parameter vector.
결과값 설명
(xopt, {fopt, iter, funcalls, warnflag})
- xopt : ndarray - minimizer of function
- fopt : number - value of function at minimum: fopt = func(xopt)
- iter : number - number of iterations
- funcalls : number - number of function calls
- warnflag : number - Integer warning flag:
- 'Maximum number of function evaluations.'
- 'Maximum number of iterations.'
- allvecs : Python list - a list of solutions at each iteration