From octave-sources-request at bevo dot che dot wisc dot edu Mon Nov 1 02:35:13 1999 Subject: "Levenberg-Marquardt" implementation From: etienne grossmann To: octave-sources at bevo dot che dot wisc dot edu CC: etienne at isr dot ist dot utl dot pt Date: Mon, 1 Nov 1999 08:35:32 +0000 (WET) Hello, is anyone interested in a Levemberg-Marquardt-like function minimizer? It is not quite a LM algorithm like the one described in the "numerical recipes" book, because it will minimize any function as long as you provide its derivative and the inverse of its Hessian. Seems to work ok. Etienne ====================================================================== [x,v,niter,h,y] = levmar_min(u,func,d2func,xinit,options) Levenberg-Marquardt method for minimizing the norm of obs-func(x) starting from 'xinit'. - xinit is a N-by-1 column vector. - 'func' returns the sum of squares : v = func(u,x), or v = func(u,x,y) if an extra argument 'y' is specified amongst the options. - 'd2func' returns the sum of squares (1x1), its differential (1xN) and the *pseudo-inverse* of its second differential (NxN) : [v,dv,d2v]=d2func(u,x[,y]). 'y' is again optional. 'vinit',v : Value of the function at xinit. Saves one evaluation. 'maxouter', m : At most m iterations of the outer loop (default : 500) 'maxinner', m : At most m iterations of the inner loop (default : 30) 'mimprov', w : Stop if best_value over new_best_value is above w, which should be 0