2 Sep 2004 22:42
optimize.fmin: xtol/ftol
Michael Culbertson <Michael.J.Culbertson <at> wheaton.edu>
2004-09-02 20:42:28 GMT
2004-09-02 20:42:28 GMT
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
I've put together a stream-of-conciousness set of notes on the Wiki with
my 0.02 worth. Travis )., Pearu, and others, feel free to add to this.
RSS Feed