[Scipy-tickets] [SciPy] #1778: fmin_ncg fails at Rosenbrock
SciPy Trac
scipy-tickets@scipy....
Fri Nov 23 17:30:29 CST 2012
#1778: fmin_ncg fails at Rosenbrock
------------------------------+---------------------------------------------
Reporter: unknown (google) | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: scipy.optimize | Version: devel
Keywords: fmin_ncg |
------------------------------+---------------------------------------------
This ticket is about how a scipy nonlinear optimization procedure is
failing to successfully find the minimum for a particular objective
function given a particular initial guess, and I do not have any proof
that this is actually a bug.
The objective function is the bivariate Rosenbrock function
http://en.wikipedia.org/wiki/Rosenbrock_function as defined in scipy and
on wikipedia and in Rosenbrock's original paper. The problematic initial
guess is (-1.2, 1.0) which is the one used by Rosenbrock in his 1960
publication. For this starting guess, most of the scipy.optimize
functions are able to find the minimum f(1,1)=0, (results not included
here) but for some reason fmin_ncg fails, even though it has access to the
function's gradient and hessian and the objective function is smooth with
only a single local minimum. Strangely, fmin_tnc successfully finds the
optimum whereas fmin_ncg fails, even though the two algorithms are
supposedly nearly the same (Newton conjugate gradient).
>>> scipy.optimize.fmin_ncg(scipy.optimize.rosen, numpy.array([-1.2,
1.0]), fprime=scipy.optimize.rosen_der, fhess=scipy.optimize.rosen_hess)
Optimization terminated successfully.
Current function value: 3.811010
Iterations: 39
Function evaluations: 41
Gradient evaluations: 39
Hessian evaluations: 39
array([-0.95155681, 0.91039596])
>>> scipy.optimize.fmin_tnc(scipy.optimize.rosen, numpy.array([-1.2,
1.0]), fprime=scipy.optimize.rosen_der, disp=0)
(array([ 1.00008039, 1.00016113]), 83, 1)
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1778>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list