nelder-mead simplex method · nelder mead simplex method is a simple minimization algorithm. start...

13
Nelder-Mead Simplex Method Rebecca Glaudell CERN REU 2013 BE-ABP-CC3 with thanks to: Rogelio Tomas Garcia Javier Barranco Garcia July 19, 2013 1 J. A. Nelder, R. Mead, “A Simplex Method for Function Minimization”, Computer Journal, vol. 7, pp. 308-313, 1965

Upload: others

Post on 07-Apr-2020

35 views

Category:

Documents


1 download

TRANSCRIPT

Nelder-Mead Simplex Method

Rebecca Glaudell

CERN REU 2013

BE-ABP-CC3

with thanks to:

Rogelio Tomas Garcia

Javier Barranco Garcia

July 19, 2013

1 J. A. Nelder, R. Mead, “A Simplex Method for Function Minimization”, Computer Journal, vol. 7, pp. 308-313, 1965

Nelder Mead Simplex Method is a simple minimization

algorithm.

Start with an n-dimensional function you want to

minimize.

July 19, 2013

2

Let’s take Rosenbock’s

parabolic valley, a.k.a

the banana function.

http://en.wikipedia.org/wiki/File:Rosenbrock_function.svg

Image from Microsoft Clip Art

Initialize a simplex with n+1 random vertices.

July 19, 2013

http://en.wikipedia.org/wiki/File:Rosenbrock_function.svg

3

(0, 2.5)

(-2, 1)

(1, -0.5)

Calculate the centroid of the simplex

July 19, 2013

4

(0, 2.5)

(1, -0.5)

(-2, 1)

Order the points from highest to lowest

July 19, 2013

5

225

626

909

high low

Reflect the highest point across the centroid

July 19, 2013

6

high low

You can change the

reflection coefficient, α,

to improve convergence.

Here, a =1

Evaluate the new point

• Is it better than the best point?

– if so, keep looking in that direction and replace

worst point

• Is it in the middle?

– replace the worst point

• Is it worse than the worst point?

– move entire simplex closer to the best point

July 19, 2013

EXPANSION

CONTRACTION

7

3 coefficients must be chosen: for reflection, expansion,

and contraction.

An initial simplex must be chosen (or an initial point

and 1-D increments).

There is no pre-evaluation of the search direction.

July 19, 2013

This is not ideal 8

Put your starting vertices in a matrix from low to high

July 19, 2013

So let’s improve it 9

1 -0.5

0 2.5

-2 1

é

ë

êêê

ù

û

úúú

The diagonal defines your extra point, xs.

“Step 1: Initialize a simplex

with (n+1) random vertices

x1, x2, …, xn.”

N. Pham, B. M. Wilamowski, “Improved Nelder Mead’s Simplex Method and Applications”, Journal of Computing, vol. 3, iss. 3, pp. 55-62

July 19, 2013

Calculate pseudo-gradients and refine reflection 10

Calculated reflected point as R’ = B - σ*G

best point

step size

??

Previously, G referred to a

‘good’ point. Presumably,

they mean the vector ‘g’

containing the pseudo-

gradients.

f (i±1)- f (xs)

even-odd

July 19, 2013

Calculating pseudo-gradients Cookies 11

1 2 3

4 5 6

7 8 9

é

ë

êêê

ù

û

úúú

Say we number a matrix

containing our n vertices.

next to the

point we are

looking at

xs/ith

coordinate of

xs

July 19, 2013 12

You have questions?

Me have answers.

July 19, 2013

Let’s try it out 13

(1,1)