ArticleslgStudy

computer science

Nelder–Mead method

Nelder–Mead method is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Nelder–Mead method rather than just read about it. In short: The Nelder–Mead method (also downhill simplex method, amoeba method, or polytope method) is a numerical method used to find a local minimum or maximum of an objective function in a multidimensional space. It is a direct search method (based on function comparison) and is often applied to nonlinear optimization problems for which derivatives may not be known.

Nelder–Mead method — main illustration
Nelder–Mead method — illustration

Key takeaways

  • Nelder–Mead method belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Nelder–Mead method to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Nelder–Mead method from memory before moving on to harder problems.

Reference excerpt

The Nelder–Mead method (also downhill simplex method, amoeba method, or polytope method) is a numerical method used to find a local minimum or maximum of an objective function in a multidimensional space. It is a direct search method (based on function comparison) and is often applied to nonlinear optimization problems for which derivatives may not be known. However, the Nelder–Mead technique is a heuristic search method that can converge to non-stationary points on problems that can be solved by alternative methods. The Nelder–Mead technique was proposed by John Nelder and Roger Mead in 1965, as a development of the method of Spendley et al.

Overview The method uses the concept of a simplex, which is a special polytope of n + 1 vertices in n dimensions. Examples of simplices include a line segment in one-dimensional space, a triangle in two-dimensional space, a tetrahedron in three-dimensional space, and so forth. The method approximates a local optimum of a problem with n variables when the objective function varies smoothly and is unimodal. Typical implementations minimize functions, and we maximize f ( x ) {\displaystyle f(\mathbf {x} )} by minimizing − f ( x ) {\displaystyle -f(\mathbf {x} )} . For example, a suspension bridge engineer has to choose how thick each strut, cable, and pier must be. These elements are interdependent, but it is not easy to visualize the impact of changing any specific element. Simulation of such complicated structures is often extremely computationally expensive to run, possibly taking upwards of hours per execution. The Nelder–Mead method requires, in the original variant, no more than two evaluations per iteration, except for the shrink operation described later, which is attractive compared to some other direct-search optimization methods. However, the overall number of iterations to proposed optimum may be high. Nelder–Mead in n dimensions maintains a set of n + 1 test points arranged as a simplex. It then extrapolates the behavior of the objective function measured at each test point in order to find a new test point and to replace one of the old test points with the new one, and so the technique progresses. The simplest approach is to replace the worst point with a point reflected through the centroid of the remaining n points. If this point is better than the best current point, then we can try stretching exponentially out along this line. On the other hand, if this new point isn't much better than the previous value, then we are stepping across a valley, so we shrink the simplex towards a better point. An intuitive explanation of the algorithm from "Numerical Recipes":

The downhill simplex method now takes a series of steps, most steps just moving the point of the simplex where the function is largest (“highest point”) through the opposite face of the simplex to a lower point. These steps are called reflections, and they are constructed to conserve the volume of the simplex (and hence maintain its nondegeneracy). When it can do so, the method expands the simplex in one or another direction to take larger steps. When it reaches a “valley floor”, the method contracts itself in the transverse direction and tries to ooze down the valley. If there is a situation where the simplex is trying to “pass through the eye of a needle”, it contracts itself in all directions, pulling itself in around its lowest (best) point.

Unlike modern optimization methods, the Nelder–Mead heuristic can converge to a non-stationary point, unless the problem satisfies stronger conditions than are necessary for modern methods. Modern improvements over the Nelder–Mead heuristic have been known since 1979. Many variations exist depending on the actual nature of the problem being solved. A common variant uses a constant-size, small simplex that roughly follows the gradient direction (which gives steepest descent). Visualize a small triangle on an elevation map flip-flopping its way down a valley to a local bottom. This method is also known as the flexible polyhedron method. This, however, tends to perform poorly against the method described in this article because it makes small, unnecessary steps in areas of little interest.

One possible variation of the NM algorithm (This approximates the procedure in the original Nelder–Mead article.)

We are trying to minimize the function f ( x ) {\displaystyle f(\mathbf {x} )} , where x ∈ R n {\displaystyle \mathbf {x} \in \mathbb {R} ^{n}} . Our current test points are x 1 , … , x n + 1 {\displaystyle \mathbf {x} _{1},\ldots ,\mathbf {x} _{n+1}} .

… excerpt ends here. Continue reading the full article.

Illustrations

Nelder–Mead method: An iteration of the Nelder-Mead method over two-dimensional space.
An iteration of the Nelder-Mead method over two-dimensional space.
Nelder–Mead method: Search over the Rosenbrock banana function
Search over the Rosenbrock banana function
Nelder–Mead method: Search over Himmelblau's function
Search over Himmelblau's function
Nelder–Mead method: Nelder–Mead minimum search of Simionescu's function. Simplex vertices are ordered by their value, with 1 having the lowest (best) value.
Nelder–Mead minimum search of Simionescu's function. Simplex vertices are ordered by their value, with 1 having the lowest (best) value.
Nelder–Mead method: Nelder–Mead method applied to the Rosenbrock function
Nelder–Mead method applied to the Rosenbrock function

Worked examples

Example 1 — a first encounter with Nelder–Mead method

Start with the simplest possible case. Write down what Nelder–Mead method claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Nelder–Mead method before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Nelder–Mead method ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Nelder–Mead method

In research
Nelder–Mead method appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Nelder–Mead method in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Nelder–Mead method is common in secondary-school and first-year university syllabi. It links to neighbouring topics Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Nelder–Mead method outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Nelder–Mead method in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Nelder–Mead method means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Nelder–Mead method out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Nelder–Mead method in simple terms?

The Nelder–Mead method (also downhill simplex method, amoeba method, or polytope method) is a numerical method used to find a local minimum or maximum of an objective function in a multidimensional space. It is a direct search method (based on function comparison) and is often applied to nonlinear…

Why does Nelder–Mead method matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Nelder–Mead method?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Nelder–Mead method.

Tags

  • Optimization algorithms and methods

Keep exploring