[SciPy-dev] connecting tnc 1.3
dmitrey
openopt@ukr....
Tue Jul 24 08:56:50 CDT 2007
Alan G Isaac wrote:
> On Tue, 24 Jul 2007, dmitrey apparently wrote:
>
>> So now I decided just remove check for ||x_final-x_opt||
>>
>
> Hmmm. I am not completely comfortable with this.
>
But the idea is not mine - it had been already done by someone in
scipy/sandbox/newoptimize/tnc.py
in function test:
ex = pow(enorm/norm, 0.5)
print "X Error =", ex
ef = abs(fg(xopt)[0] - fg(x)[0])
print "F Error =", ef
if ef > 1e-8:
raise "Test "+fg.__name__+" failed"
so, as you see, check for ex is absent (and I think it's rigth, elseware
we should provide different error-rising barriers for EACH test func
from all those lots related to scipy.optimize test).
But in scipy.optimize check of ||x-x_opt|| is still present.
I intend just to move the changes to scipy.optimize.
BTW if someone will run one of the well-known test func Hilbert(50) (or
other rather big n), the typical ||x-x_opt|| (for different solvers)
could be something like 100-500, while ||f-f_opt|| can be very small
(like 1e-6). This is due to ill-conditioned matrix A from the
unconstrained problem (A = hilb(50), b = sum(A), objfunc = x'Ax - bx)
HTH, D.
D.
More information about the Scipy-dev
mailing list