[Scipy-tickets] [SciPy] #1558: Bug in fmin_bfgs linesearch

SciPy Trac scipy-tickets@scipy....
Wed Nov 9 17:25:42 CST 2011


#1558: Bug in fmin_bfgs linesearch
----------------------------------+-----------------------------------------
 Reporter:  kelleyh               |       Owner:  somebody   
     Type:  defect                |      Status:  new        
 Priority:  normal                |   Milestone:  Unscheduled
Component:  scipy.optimize        |     Version:  0.9.0      
 Keywords:  fmin_bfgs linesearch  |  
----------------------------------+-----------------------------------------

Comment(by kelleyh):

 Oops! This is the correct version of my modified code:

     while (gnorm > gtol) and (k < maxiter):

         pk = -numpy.dot(Hk,gfk)
         original_old_fval=old_fval
         original_old_old_fval=old_old_fval
         alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \

             linesearch.line_search(f,myfprime,xk,pk,gfk,

                 old_fval,old_old_fval)

         if alpha_k is None: # line search failed try different one.

                 alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \

                     line_search(f,myfprime,xk,pk,gfk,

                         original_old_fval,original_old_old_fval)

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


More information about the Scipy-tickets mailing list