Stefan-Endres / shgo

Simplicial Homology Global Optimization
https://stefan-endres.github.io/shgo
MIT License
44 stars 12 forks source link

Is there any way to terminate close to a desired number of function evaluations? #34

Closed microprediction closed 3 years ago

microprediction commented 3 years ago

I've noticed that {'maxfev':50} often results in >200 actual function evaluations. Is there a way to ensure this number is closer to what one desires, for example when the function to be evaluated is very expensive?

alchemyst commented 3 years ago

This is probably due to the extra function evaluations used by the local minimisation. You can try to pass a low maxiter value in minimizer_kwargs.

Stefan-Endres commented 3 years ago

In addition to supplying minimizer_kwargs (max only supported by some local solvers), there is also a bug in the current stable release that incorrectly runs an entire extra global iteration under some circumstances. This should be fixed with ea62d2f2a22024149624d315d08eff0c8ad33c1c and will be added to added to downstream repositories (scipy and pypi) once the last unittests are fixed (failures related to another issue).