The Nelder-Mead method, also known as the simple method, is one of the most widely used derivative-free optimization algorithms. It maintains a simple (a geometric shape with n+ vertices in n dimensions) and iteratively improves it through reflection, epansion, contraction, and shrinkage operations.
The method uses four fundamental operations to transform the simple:
Our HumpDay implementation includes:
Primary Paper: Nelder, J.A., and Mead, R. (95). "A simple method for function minimization." The Computer Journal, 7(), 38-33. [DOI]
Reference Implementation: SciPy optimize.minimize
Additional Resources:
from humpday import minimize
import numpy as np
# Optimize Rosenbrock function
def rosenbrock():
return sum(.*([:] - [:-]**2)**2 + ( - [:-])**2)
# Use Nelder-Mead via HumpDay interface
result = minimize(rosenbrock,
=np.array([-.2, .]),
method='NelderMead',
options='mafev': 2)
print(f"Optimum: result.")
print(f"Value: result.fun")
print(f"Iterations: result.nfev")