Page 1 of 1

Meaning of polyfitting coeffs

Posted: Fri Mar 20, 2009 9:31 am
by 13051218
I'm implementing a polyfitting function to a curve. The Chart works beautifully on an example but if I compute the values wiht the polyfitting coefficients I get strange numbers.
The question is: Are the coefficients normalized?, do I have to apply a transformation? or anything.

An example using your basic fitting example and. Adding these points:
TChart1.Series(0).Add(2, 6, "")
TChart1.Series(0).Add(5, 4, "")
TChart1.Series(0).Add(3, 7, "")
TChart1.Series(0).Add(1, 9, "")
TChart1.Series(0).Add(1.6, 8, "")
TChart1.Series(0).Add(2.2, 5, "")
TChart1.Series(0).Add(3.2, 4, "")
TChart1.Series(0).Add(6, 4.5, "")

Using your example code and adjusting with polyFitting1.PolyDegree = 3
I get the following equation

y= +4.8117 -2.5595*x +0.3412*x^2

The chart data gives you the reading Y=5.057 for X=3. However, If you apply the above equation, you get Y= 0.204 for X=3

My question is Where is the trick?, How do you apply the coefficients and explain the difference?. Maybe you have some written documentation on the method used for fitting the curve and the meaning of the coeficients

Thank you

Re: Meaning of polyfitting coeffs

Posted: Fri Mar 20, 2009 3:25 pm
by Chris
Yacu,
Yacu wrote: My question is Where is the trick?, How do you apply the coefficients and explain the difference?. Maybe you have some written documentation on the method used for fitting the curve and the meaning of the coeficients
There's a thread discussing this issue which I strongly recommend you read here. I hope this is of some help!