[SciPy-Dev] Optimization success threshold?
Ryan J. Kinnear
ryan at kinnear.ca
Mon Aug 10 12:47:19 EDT 2015
Gyro,
The objective function returning 0 does not halt the optimizer, it will
keep trying to find objective function values below 0.
Using
cost = f(x)
if cost < threshold:
return 0
else:
return cost
Will cause it to halt shortly after finding a cost below the threshold
because of the ftol parameter. But it still does a few more expensive
cost function evaluations before returning. Another downside is that it
won't tell you what the actual cost was, it may be exactly "threshold",
or it may be significantly less.
-RK
On 08/10/2015 10:39 AM, Gyro Funch wrote:
> On 8/9/2015 10:31 PM, ryan wrote:
>> I actually think it was misunderstood yes, I will try to improve my explanation.
>>
>> The ftol and xtol parameters halt the optimizer when the objective isn't changing very much (it thinks it has converged). But for my application (microwave filter design), cost function evaluations are very expensive, up to a couple seconds on simple models, and up to even 10 min + for electromagnetic simulations. We have some notion of what a "good enough" objective function value is (e.g. reflected power below -20dB) and we want the optimizer to stop as soon as it finds some parameters that satisfy this criteria so that it doesn't keep running long simulations for no reason. I would call it something like a success threshold option.
>>
>> This seems like a reasonable feature, especially for expensive cost functions or non convex problems - which is why I'm posting in scipy-dev. Although even though there is no explicit option for specifying a success threshold, there may be a reasonable idiom for doing this that I am just unaware of.
>>
>> -RK
>>
>>
>
> I may be misunderstanding, but can't the objective function be
> recast to take into account this threshold?
>
> For instance, instead of
>
> f(x) = 0,
>
> use something like
>
> f(x) - threshold = 0.
>
> -gyro
>
>
>
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
More information about the SciPy-Dev
mailing list