Пример #1
0
def run_nelder_mead():
    xy0 = numpy.array([1.0, 1.0, 1.0])
    res = minimize(f, xy0, method="nelder-mead")
    x, y, z = res.x
    return x, y, z, f((x, y, z))
Пример #2
0
def run_newton_cg():
    xy0 = numpy.array([1.0, 1.0, 1.0])
    res = minimize(f, xy0, method="Newton-CG", jac=J, hess=H)
    x, y, z = res.x
    return x, y, z, f((x, y, z))
Пример #3
0
def run_bfgs():
    xy0 = numpy.array([1.0, 1.0, 1.0])
    res = minimize(f, xy0, method="BFGS", jac=J)
    x, y, z = res.x
    return x, y, z, f((x, y, z))
Пример #4
0
def run_nelder_mead():
  xy0 = numpy.array([1.0, 1.0, 1.0])
  res = minimize(f, xy0, method = 'nelder-mead')
  x, y, z = res.x
  return x, y, z, f((x, y, z))
Пример #5
0
def run_newton_cg():
  xy0 = numpy.array([1.0, 1.0, 1.0])
  res = minimize(f, xy0, method = 'Newton-CG', jac = J, hess = H)
  x, y, z = res.x
  return x, y, z, f((x, y, z))
Пример #6
0
def run_bfgs():
  xy0 = numpy.array([1.0, 1.0, 1.0])
  res = minimize(f, xy0, method = 'BFGS', jac = J)
  x, y, z = res.x
  return x, y, z, f((x, y, z))