Which row of the output of a Nelder-Mead Simplex algorithm is the optimal?

4 views (last 30 days)
Basically I'm using Nelder-Mead to optimise a function which depends on 5 parameters. I understand (heuristically) how this algorithm works, and I understand that I need to give it a 6x5 array as its initial simplex. However, what I don't understand is what the output means. It gives me a 6x5 array as the output, which row in the output is the optimal value for my function? Or have I fundamentally misunderstood what's happening? Any help would be greatly appreciated!

Answers (1)

Matt J
Matt J on 12 Mar 2013
Edited: Matt J on 12 Mar 2013
If you're implementing Nelder-Meade via the FMINSEARCH command, you should be initializing with a length 5 vector, not with a 6x5 array. The output should also be a vector of length 5.
  3 Comments
Timothy Russell
Timothy Russell on 12 Mar 2013
Okay, it now outputs a length 5 vector which is good, however the values are exactly the same as the initial ones. But it definitely isn't converging as if I change the initial values, the output values are again the same as the initial ones.
Matt J
Matt J on 12 Mar 2013
Edited: Matt J on 12 Mar 2013
Certain functions are locally flat (i.e., local minima) almost everywhere, for example
f(x) = round(x)
and so fminsearch will stop given almost any initial point. Make sure your function isn't one of these!
Also, make sure the 'TolFun' option is set suitably for your particular cost function. TolFun=z means that any reduction in the cost that is less than z is considered insignificant by FMINSEARCH and will cause it to stop.
Alternatively, scale your function by some large positive number and see if that makes a difference.

Sign in to comment.

Categories

Find more on Systems of Nonlinear Equations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!