-------- Original-Nachricht --------
Datum: Mon, 17 Dec 2007 15:31:03 +0900
Von: Phil Rhoades <
[email protected]>
An: (e-mail address removed)
Betreff: Re: Curve fitting to data
Dear Phil,
it is of course preferable to have some idea about the underlying
relationship between data graphed, such as
y = a*x^2 + b*x + c,
and then fit that model (this can be done by solving a linear
equation,
Matrix([x_0^2,x_0,1],...,[x_n^2,x_n,1])*([a,b,c]^transpose)=[y_0,..,y_n]^transpose
(numbering data points as ((x_0,y_0),....(x_n,y_)) and
[..] indicating rows in the matrix or row vectors)),
as this is a linear equation in the parameters a,b,c .
You can do that with any software that solves linear or matrix
equations, i.e., rsruby or rb-gsl .
It is of course also true that one can basically draw arbitrary
curves to connect data points, if you don't know that a model
like the above is "true".
Now, one additional line of thought is pursued in the discipline
of "approximation theory" (see eg., Wikipedia, or for a deeper
insight,
http://books.google.de/books?id=ODZ...le&cad=one-book-with-thumbnail&hl=de#PPA93,M1).
Here, one starts with a points, as yours, and asks,
Given a distance measure between the data and the curve ("norm") and a set of admissible model curves (e.g., all continuous curves on an interval),
which curves will minimize that norm ?
There are indeed some results available, such as Chebyshev or Remez(Remes) approximation procedures.
This kind of procedure can be recommended when the functional relationship of your data is rather complicated/not enormously interesting/you distrust
simple models, you know something about the general wiggliness of the underlying curve (see the Jackson theorems in Powell's book), and you need to have information about what you would have measured at some point you didn't actually measure and the result should be not too far off ...
Best regards,
Axel