[SciPy-dev] Trouble with optimize.fmin_ncg
Tue Jul 24 10:33:51 CDT 2007
Nils, are you sure that troubles raised after last svn changes?
All my changes are in func _cubicmin from optimize.py
but when I placed a breakpoint there, the hanging cycle didn't reached
Can't you do the same trick?
d1 = empty((2,2))
I have found the hanging cycle (optimize.py, line 1030,
while numpy.add.reduce(abs(ri)) > termcond: )
but numpy.add.reduce(abs(ri)) is constantly growing here.
maybe you had changed x0 and now it's too far from x_opt?
btw if 2nd derivatives are not supplied, then other cycle is hanging:
while (numpy.add.reduce(abs(update)) > xtol) and (k < maxiter):
I don't know howto fix the problem.
Please inform me about the breakpoint.
BTW your func seems to be very suspicious to me
rq = dot(v.T,A*v)/dot(v.T,B*v)
res = (A*v-rq*B*v)/linalg.norm(B*v)
are you sure that the func(v)=dot(v.T,A*v)/dot(v.T,B*v) is convex?
So using 2nd derivatives (or their approximating by fmin_ncg (if user
didn't provide that ones) , in line 1033:
Ap = approx_fhess_p(xk,psupi,fprime,epsilon)
will handle non-convex funcs much more bad than 1-st order do.
Nils Wagner wrote:
> dmitrey wrote:
>> you have line
>> A = io.mmread('nos4.mtx') # clustered eigenvalues
>> but you didn't provide nos4.mtx file
>> please send it to me.
>> Regards, D.
> Sorry for that. The matrix is available
> at http://math.nist.gov/MatrixMarket/data/Harwell-Boeing/lanpro/nos4.html
> Scipy-dev mailing list
More information about the Scipy-dev