MATLAB: Nelder-Mead initial simplex size

nelder-meadoptimizationsimplex

Hello
I use Matlab's fminsearch function for finding the minimum with Nelder-Mead. fminsearch calculates the size of the initial simplex automatically. In my case, the initial simplex is too small, thus it performs not well.
fminsearch uses a leg of length 5% of the size of each variable, with a value of 0.00025 for zero variables. However, I have read the following ( source ):
However, it can be a reasonable policy to set the points in such a way that the simplex covers virtually the entire possible range. The algorithm of Nelder-Mead will shrink automatically the simplex and aproximate to the optimum. The practical advantage of this policy is that you will obtain a better overall-knowledge of the response-function.
What leg length (percentage) do I have to choose to admit to this policy?
Please remember that the first simplex-opereation is aƱways a reflection. If the starting simplex covers the whole permitted range the reflection necessarily will give a point off limits. But HillStormer allows to use linear constraints and can avoid this problem.
Which linear constraints do I have to use to avoid this problem? I'm using fminsearchbnd and fminsearchcon which allows such constraints.
Last but not least, I've read in Numerical Recipes that when the algorithm gets stuck at a local minima, it helps to reinitialize the simplex at the point where you get stuck. Of course, if fminsearch terminates I can rerun it with the new points as starting points. To what value should I set the initial simplex size in this case?

Best Answer

I don't see the problem. fminsearch is also able to expand the simplex. Also, not starting it out from zero can help. If it uses a 5% relative simplex, then the initial size won't be so tiny.
As far as going out of bounds is concerned, why worry? The bound constraints already in fminsearchbnd prevent a sample point from going outside of the bounds. There is no need to use linear constraints, as all they will do is slow things down a bit.
Always be careful in modifying supplied code.
Related Question