[SciPy-user] optimize.fmin_l_bfgs_b and 'ABNORMAL_TERMINATION_IN_LNSRCH',

Ryan Krauss ryanlists@gmail....
Mon Oct 29 22:37:55 CDT 2007


Yes.

On 10/29/07, Dominique Orban <dominique.orban@gmail.com> wrote:
>
> On 10/29/07, Ryan Krauss <ryanlists@gmail.com> wrote:
> > I am using optimize.fmin_l_bfgs_b and getting the following output:
> >
> > (array([ 8142982.47310469,        0.        ,   614438.11725001]),
> >  1.58474444864e+12,
> >  {'funcalls': 21,
> >   'grad': array([      0.    ,  952148.4375,   24414.0625]),
> >   'task': 'ABNORMAL_TERMINATION_IN_LNSRCH',
> >   'warnflag': 2})
> >
> > What does this mean?  I am trying to do a least squares curve fit
> between
> > some noisy data and a nonlinear model.  I need to constrain one of my
> fit
> > parameters to be positive.  I do not have an fprime function, so the
> > gradient is being determined numerically.
> >
> > Is there a better routine to use?
> >
> > I get a fairly close answer using my own hacked solution of using
> > optimize.fmin where the cost function adds a gigantic penalty to the
> cost if
> > the middle coefficient is greater than 0:
> > [  8.16174249e+06   1.93528613e-10   6.14626152e+05]
> >
> > So, I don't think the answer is bad, I just want to know why it
> terminated
> > abnormally and whether or not I can trust the result.
>
> Is it possible that your numerical gradient be (very) inaccurate ?
>
> Dominique
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20071029/ff9ede3c/attachment-0001.html 


More information about the SciPy-user mailing list