Terminate scipy minimize as soon as function values is below threshold
You can use the callback argument to minimize. This is a function that is called at each iteration of the minimization. You can use this to check the value of the function and terminate the minimization if it is below the threshold.
I have a function of some parameters that will return a probability. How can I set scipy's  minimize to terminate as soon as finds some parameters that will return a probability below a certain threshold (even if it is a "large" probability like 0.1 or so)?
Thanks a lot!