Levenberg-Marquat code questions


Frank Lawlor
05-22-2004, 03:08 PM
I recently purchased NR and the CD for some work I
am doing. It has been very helpful. Years ago I
developed a technique for doing multi-dimensional,
non-linear curve fitting which is very fast and
flexible and works well. I recently had occasion
to see if anyone had developed a similar or better
technique. I was surprised that I couldn't find
anything so I decided to put together a program
which implements the technique.

As a part of this I need a good single independent
variable, non-linear fitter. From the web and NR
it looked like Levenberg-Marquart would be a good
choice.

I got the code from the CD working (as a Java
program), but had a few questions, problems and
suggestions.

I could find no definition or discussion of 'sig'
in the book or code. The book has some references
to sigma, variance and standard deviation and
seems to switch between them, but these are vague
and it wasn't clear if they applied to the L-M
algorithm. The only appendix references seemed to
be to minor references in other areas. This seems
like an important topic.

In the code, I found that I had convergence
problems when sig was set to y*.001, but setting
it to 1 worked better. Is the sig reference a
reference to sigma or sigma squared? How does the
choice relate to the data?

The book is generally unclear about sigma,
standard deviation, variance, etc.

There is no real discussion about the initial
choice of values for a ('coefficients'). Maybe
this is beyond the scope of the book, but it would
be helpful.

The code examples are helpful, but would be much
more helpful if there were some comments
describing what is going on. The description of
interfaces (including parameters) is very
important, but the book and code is quite unclear
in place (e.g., what is sig).

Thanks in advance for any help.

-- Frank