
28 Feb
2007
28 Feb
'07
7:42 p.m.
G'day all.
Quoting David Roundy
Conjugate gradients shouldn't require more than about five lines of code (which I don't have time to write at the moment), apart from array code for the vectors you wish to minimize.
I apologise for the quality of the code, but here's an implementation of the Marquardt-Levenberg algorithm (which is actually a smooth interpolation between the conjugate gradient and Newton-Raphson methods), which I had to do a year or so ago: http://andrew.bromage.org/darcs/misc/Marquardt.hs It even includes code to compute standard errors on the parameters. Cheers, Andrew Bromage