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

Jason Rennie jrennie@gmail....
Mon Oct 5 16:51:35 CDT 2009


I created a trac ticket for this:
http://projects.scipy.org/scipy/ticket/1012

Jason

On Mon, Oct 5, 2009 at 4:31 PM, Jason Rennie <jrennie@gmail.com> wrote:

> Here's one fix (I'm still seeing problems, but this definitely improves the
> situation):
> $ diff linesearch.py
> /usr/lib/python2.6/dist-packages/scipy/optimize/linesearch.py
> 52c52
> <     if task[:5] == 'ERROR' or task[:4] == 'WARN':
> ---
> >     if task[:5] == 'ERROR' or task[1:4] == 'WARN':
>
> linesearch.line_search wasn't catching WARNINGs returned
> by minpack2.dcsrch.
>
> Jason
>
> On Mon, Oct 5, 2009 at 4:11 PM, Jason Rennie <jrennie@gmail.com> wrote:
>
>> The bug seems to be that scipy.optimize.linesearch.line_search can return
>> a step size which increases the objective.  Later linesearches are then
>> fubar'd b/c the (phi0-old_old_fval)/derphi0 calculation yields a negative
>> value.
>>
>> Would someone mind sanity-checking this assertion?  Is it possible
>> for minpack2.dcsrch to return a step which yields a negative objective?  I'm
>> seeing it when the amin value is hit.  I.e. it's returning a step size of
>> 1e-8.
>>
>> Thanks,
>>
>> Jason
>>
>> --
>> Jason Rennie
>> Research Scientist, ITA Software
>> 617-714-2645
>> http://www.itasoftware.com/
>>
>>
>
>
> --
> Jason Rennie
> Research Scientist, ITA Software
> 617-714-2645
> http://www.itasoftware.com/
>
>


-- 
Jason Rennie
Research Scientist, ITA Software
617-714-2645
http://www.itasoftware.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091005/ca0fc309/attachment-0001.html 


More information about the SciPy-User mailing list