#2607: find_minimum_on_interval() uses the wrong scipy function
----------------------------------------------------------------------------------+
       Reporter:  AlexGhitza                                                    
  |         Owner:  jwmerrill                                           
           Type:  defect                                                        
  |        Status:  needs_work                                          
       Priority:  major                                                         
  |     Milestone:  sage-5.2                                            
      Component:  calculus                                                      
  |    Resolution:                                                      
       Keywords:  sd31, sd40.5                                                  
  |   Work issues:                                                      
Report Upstream:  N/A                                                           
  |     Reviewers:  Karl-Dieter Crisman, Mike Hansen, Andrey Novoseltsev
        Authors:  Dan Drake, Andrey Novoseltsev, Andrzej Giniewicz, Volker 
Braun  |     Merged in:                                                      
   Dependencies:  #13109                                                        
  |      Stopgaps:                                                      
----------------------------------------------------------------------------------+
Changes (by {'newvalue': u'Dan Drake, Andrey Novoseltsev, Andrzej Giniewicz, 
Volker Braun', 'oldvalue': u'Dan Drake, Andrey Novoseltsev, Andrzej 
Giniewicz'}):

  * status:  positive_review => needs_work
  * author:  Dan Drake, Andrey Novoseltsev, Andrzej Giniewicz => Dan Drake,
             Andrey Novoseltsev, Andrzej Giniewicz, Volker
             Braun


Old description:

> This was reported by Dean Moore on sage-support.  Consider:
>
> {{{
> sage: f(x) = -x*sin(x^2)
> sage: f.find_minimum_on_interval(-2.5, 2)
> (-1.3076194129914434, 1.35521114057)
> sage: f.find_minimum_on_interval(-2.5, -1)
> (-2.1827697846777219, -2.19450274985)
> }}}
>
> So find_minimum_on_interval() returns a local minimum as opposed to the
> global one.  (The same issue applies to find_maximum_on_interval.)  This
> is due to the fact that the function wraps scipy.optimize.fminbound,
> which is only a local optimizer (Carl Witty pointed this out).  We should
> instead use one of the global optimizers, i.e. scipy.optimize.anneal or
> scipy.optimize.brute.
>
> '''Apply:'''
>  * [attachment:trac2607.patch]
>  * [attachment:trac2607-whitespace.2.patch]
>  * [attachment:trac_2607_renaming.3.patch]
>  * [attachment:trac2607-doctest-and-spacing.patch]

New description:

 This was reported by Dean Moore on sage-support.  Consider:

 {{{
 sage: f(x) = -x*sin(x^2)
 sage: f.find_minimum_on_interval(-2.5, 2)
 (-1.3076194129914434, 1.35521114057)
 sage: f.find_minimum_on_interval(-2.5, -1)
 (-2.1827697846777219, -2.19450274985)
 }}}

 So find_minimum_on_interval() returns a local minimum as opposed to the
 global one.  (The same issue applies to find_maximum_on_interval.)  This
 is due to the fact that the function wraps scipy.optimize.fminbound, which
 is only a local optimizer (Carl Witty pointed this out).  We should
 instead use one of the global optimizers, i.e. scipy.optimize.anneal or
 scipy.optimize.brute.

 '''Apply:'''
  * [attachment:trac2607.patch]
  * [attachment:trac2607-whitespace.2.patch]
  * [attachment:trac_2607_renaming.3.patch]
  * [attachment:trac2607-doctest-and-spacing.patch]
  * [attachment:trac_2607_update_deprecation.patch]

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2607#comment:62>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to