[SciPy-Dev] Optimization success threshold?

Ryan J. Kinnear ryan at kinnear.ca
Mon Aug 10 13:00:43 EDT 2015


I think this is essentially what I'm looking for yeah, thanks I'll look 
into this more.

-RK

On 08/09/2015 10:35 PM, Andrew Nelson wrote:
> I wonder if this request to halt would be satisfied by: 
> https://github.com/scipy/scipy/pull/4384?
>
> On 10 August 2015 at 14:31, ryan <ryan at kinnear.ca 
> <mailto:ryan at kinnear.ca>> 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
>
>
>     On Sat, 8 Aug 2015 10:16:11 +0200
>      Andrea Gavana <andrea.gavana at gmail.com
>     <mailto:andrea.gavana at gmail.com>> wrote:
>     >Hi Ryan,
>     >
>     >    Some of the optimizers in Scipy do accept a parameter called
>     "ftol",
>     >which specifies A tolerance for termination on the objective
>     function. Is
>     >this what you're looking for?
>     >
>     >If you're thinking about stopping the optimization when the
>     parameters are
>     >varying very little, then as far as I can see there is no option
>     for that
>     >in Scipy optimize. However, unless your objective function is rapidly
>     >changing even for very small variation of the parameters (I.e.,
>     it's very
>     >irregular), then if the parameters vary very little from one
>     iteration to
>     >the other also your objective function changes very little and
>     the "ftol"
>     >input argument should do the trick.
>     >
>     >Or maybe I have misunderstood the question?
>     >
>     >Andrea.
>     >
>     >
>     >On Friday, August 7, 2015, Ryan J. Kinnear <ryan at kinnear.ca
>     <mailto:ryan at kinnear.ca>> wrote:
>     >
>     >> Dear list,
>     >>
>     >> I'm using some of the optimization routines in scipy to help
>     design high
>     >> frequency electronic filters, it takes a very long time to
>     evaluate the
>     >> cost function just once (order of seconds). It's also not
>     necessary to
>     >> get a "perfect" design, it can quit as soon as it reaches a
>     value that
>     >> is good enough.
>     >>
>     >> As far as I can tell, there isn't really a straightforward way
>     to tell
>     >> the optimizer to quit once it gets below some threshold.  This
>     can be
>     >> hacked in with exceptions or the callback, but is that the best
>     way to
>     >> do it?  Would it be valuable to add a "success threshold" to the
>     >> optimization routines?
>     >>
>     >> -RK
>     >> _______________________________________________
>     >> SciPy-Dev mailing list
>     >> SciPy-Dev at scipy.org <mailto:SciPy-Dev at scipy.org> <javascript:;>
>     >> http://mail.scipy.org/mailman/listinfo/scipy-dev
>     >>
>     >
>     >
>     >--
>
>     Ryan
>     _______________________________________________
>     SciPy-Dev mailing list
>     SciPy-Dev at scipy.org <mailto:SciPy-Dev at scipy.org>
>     http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
>
>
> -- 
> _____________________________________
> Dr. Andrew Nelson
>
>
> _____________________________________
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150810/1f07ca78/attachment.html>


More information about the SciPy-Dev mailing list