[SciPy-dev] optimize.fmin: xtol/ftol
Michael Culbertson
Michael.J.Culbertson at wheaton.edu
Thu Sep 2 16:42:28 EDT 2004
Hello,
I think there is an error in the termination of the Simplex optimization
algorithm implemented by scipy.optimize.fmin(). According to the doc
string, xtol and ftol are _relative_ values:
xtol -- acceptable relative error in xopt for convergence.
ftol -- acceptable relative error in func(xopt) for convergence.
Yet, as I read the termination condition:
if (max(Num.ravel(abs(sim[1:]-sim[0]))) <= xtol \
and max(abs(fsim[0]-fsim[1:])) <= ftol):
break
the values are taken as absolute quantities. Shouldn't the condition
include some division of the difference by one of the values or a
multiplication of the relative tolerances by one of the values for a
proper relative comparison? Or, have I misinterpreted the statements
above?
Thanks,
Michael Culbertson
More information about the SciPy-Dev
mailing list