0

I am performing function optimization with scipy.optimize.minimize. I want the optimization to step when the value of the function is near zero with some tolerance.

If I start with a value near the actual minimum (i have computed with other solver), the optimization stops near zero (missed the goal with 8.320).

minimize(objective_function, 3044684.301964694, method='Nelder-Mead')

near zero

But if I start with arbitrary number I get difference of 10000.

minimize(objective_function, 3044000, method='Nelder-Mead')

arbitrary

  • 1
    Looks like the algorithm found a local optimum in the second screenshot. – ForceBru Feb 08 '22 at 15:28
  • All algorithms inside minimize only seek to find a local minimizer, not a global one. If your problem is not convex, you can't expect that each found minimizer is a global one. And yes, choosing a good initial point is crucial. Alternatively, you can try so-called global optimizers. – joni Feb 08 '22 at 15:41

0 Answers0