Pap, could You recommend me please good site with curve fitting? You used L-M method in LuaNumAn, but I would like to check other...
Thanks in advance!
The Levenberg-Marquardt (LM) is the de facto method for non-linear fitting (but it is also the most difficult method to implement). However, if you just want to do somekind of linear fitting (such as linear, logarithmic, or exponential fitting), you can also use simpler methods (but much less powerful than LM). I have included LM in LuaNumAn as a robust method for any kind of fitting, and I'm not planning to add simpler methods until version 2.xx, since LM does the job efficiently. Note that
data fitting is often confused with
data interpolation, but they're different things: in short, data fitting is used when you know a theoretical curve that fits your data, while interpolation is used when you don't know such a theoretical curve. For this purpose, I have already implemented cubic spline interpolation, which will be available in version 1.50.
Now, about the web sites you asked, my opinion is this: do not trust web sites dedicated to Numerical Analysis lessons; I'm sure that there
are good sites, but I have only seen poorly documented sites, which cannot be compared with a good book. So, I'm posting the titles of some excellent books, where data fitting is covered:
(1) Brian Bradie,
A friendly introduction to Numerical Analysis, Pearson Prentice Hall, 2006. Despite its title, this book is more than an "introduction". It also has excellent examples, taken from physics, chemistry, biology, economics, etc. A "must have", although the LM method is missing...
(2) J-P. Nougier,
Methodes de calcul numerique Vol. 2, Hermes Science, 2001. This is
the book. Its mathematical level is a little bit "heavier" than the others, but it covers data fitting (as well as other topics)
very extensively. I hope you speak french; if you don't, you can't read my favorite book
.
(3) J. H. Mathews & J. D. Fink,
Numerical Methods Using Matlab, Pearson Prentice Hall, 2004. Very useful book, even if you don't use Matlab. Simple data fitting is covered extensively, with many examples, but the LM method is completely missing.
(4) W. Press, S. Teukolsky, W. Vellering, B. Flannary,
Numerical Recipes (2nd edition), Cambridge University Press, 1992. This is the well-known best-seller, but, in my opinion, it is not as good as many people think. In fact, it is widely used simply because ready-to-use programs are included (they can also be purchased separately). It covers plenty of topics, but it does not explain how each method works (well, it does, but only in short). If you are interested, you can also read the book in www.nr.com.