[SciPy-User] optimize.fmin_cg terminates when w - grad*1e-10 yields lower obj & grad

josef.pktd at gmail.com josef.pktd at gmail.com
Mon Oct 5 14:35:23 EDT 2009


On Mon, Oct 5, 2009 at 1:53 PM, Jason Rennie <jrennie at gmail.com> wrote:
> On Mon, Oct 5, 2009 at 1:40 PM, <josef.pktd at gmail.com> wrote:
>>
>> Does lowering gtol help?  e.g. gtol=1e-10
>> I would keep using norm=inf  to force more iterations.
>
> Thanks for the suggestion, but no, it does not seem to help.  I get the same
> exact behavior with no norm argument (default is Inf) and a gtol=1e-10
> argument.
> Jason

In this case, I either agree with Sebastian, or you are already at a minimum
up to the usual precision, or your problem is badly scaled (my next guesses).

In your initial example, you had an improvement with a stepsize 1e-10,
however fmin_cg has a minimum stepsize of amin = 1e-8 (hardcoded) in linesearch
if my very fast skimming of the code is correct.

I don't know about fmin_cg but, if I remember correctly, I got this return code
 with other minimizers when I had an (almost) perfect fit, with no noise in the
simulation. Otherwise, you could try to rescale your problem to make the
parameters larger in absolute value.

Josef

> --
> Jason Rennie
> Research Scientist, ITA Software
> 617-714-2645
> http://www.itasoftware.com/
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>



More information about the SciPy-User mailing list