[SciPy-user] Optimizers and the number of iterations

Nils Wagner nwagner at iam.uni-stuttgart.de
Wed Feb 28 09:25:46 EST 2007


Hi all,

AFAIK, only the number of function and gradient evaluations are directly
available via full_output=1.

Is there a better way to get the number of iterations ?

What I have used so far, is

x_opt, allvec=optimize.fmin_cg(func,x_0,retall=1)
print 'The number of iterations is',shape(allvec)[0]-1



Nils
 



More information about the SciPy-User mailing list