I need to minimize a function that only allows integer input. Can I solve it with scipy.optimize.fmin
? Otherwise, is there any alternative?
Asked
Active
Viewed 303 times
5

Jorge Barata
- 2,227
- 1
- 20
- 26
-
Did you find a solution? – SwimBikeRun Jul 17 '20 at 18:04
-
I'm sorry @SwimBikeRun it has been more than 7 years and I don't remember it :( – Jorge Barata Jul 19 '20 at 08:49
-
1Have some comments here that helped me. In my case, it was monotonically decreasing (no local minima), so a simple bracketing bisect worked fine and although it's not as fast as a potential solution from root finding analogs (would be interested if possible for the math theory aspect), it's still very very fast as the problem of finding a root at maximum precision isn't an issue. https://stackoverflow.com/questions/62959501/how-to-minimize-a-real-function-with-only-integer-input?noredirect=1#comment111338050_62959501 – SwimBikeRun Jul 20 '20 at 03:55