[Scipy-tickets] [SciPy] #734: errors in fmin_bfgs and some improvements

SciPy Trac scipy-tickets@scipy....
Sat May 7 07:14:27 CDT 2011


#734: errors in fmin_bfgs and some improvements
----------------------------+-----------------------------------------------
 Reporter:  jgarcke         |       Owner:  cdavid      
     Type:  defect          |      Status:  needs_review
 Priority:  normal          |   Milestone:  0.9.0       
Component:  scipy.optimize  |     Version:  0.5.2       
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by rfc):

 Hello all,

 I suggest a few small changes to rgommers' patch (see above patch):

 1. Exposed tolerance for new stopping condition as new fmin_bfgs parameter
 xtol, default value 1e-6. I don't know what would make a good default
 tolerance. Perhaps using a smaller one would be safer.

 2. The BFGS update to Hk matrix should not be performed if yksk is non-
 positive, as this would break positive-definiteness of the matrix Hk.
 rgommers' patch ensured abs(yksk) was sufficiently large. I suggest
 removing the abs() and just ensuring yksk itself is large enough.

 3. If the update to the Hk matrix is not performed, this should not
 terminate iteration with failure, instead simply continue iterating
 without updating Hk.

 Changes 2. and 3. follow the advice from the notes on Unconstrained
 Optimization located here:
 http://www2.imm.dtu.dk/documents/ftp/publlec.html


 On a related note, I think the scalar_search_wolfe1 function from
 linesearch could use a bit of work. A more rugged line search would
 further improve the robustness of fmin_bfgs and fmin_cg. This function
 wraps minpack's dcsrch routine but I think scalar_search_wolfe1 could be
 improved to avoid calling dcsrch with invalid inputs. Another possible
 change could be to raise errors when dcsrch fails (containing the detailed
 error message from dcsrch, for example) instead of hiding the errors and
 returning None. I'd like to submit a patch for this when I can find the
 time.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/734#comment:7>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list