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

Dominique Orban dominique.orban@gmail....
Mon Oct 29 21:51:23 CDT 2007


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


More information about the SciPy-user mailing list