Page 1 of 1

Question about Polynomial Fitting and Degree

Posted: Wed Jun 10, 2009 7:27 pm
by 14045609
We had some confusion here regarding your polynomial fitting function and the degree parameter that is passed to that function.

The degree is limited to be between 2 and 20.
When we pass degree 2, we get a linear polynomial (a line, y=mx+b).
But that is defined as a Degree 1 normally.
And degree 2 usually is how you refer to a quadratic (y=ax^2 + bx + c) but in order to produce that from your polynomial fitting function we have to call it a degree of 3.

That is somewhat confusing in that it does not follow what I am told are the standard definitions of the degree of a polynomial. So is the parameter really the number of terms in the equation and not technically the degree? It is called degree in the feature demo.

Can you explain the usage of 2-20 instead of starting at 1 since a degree 1 should yield the linear result?

I myself am not a "math guy" I'm just the programmer implementing this into our application. The guys that use my app have more detailed knowledge about the math side of it and were the ones that raised this confusion to me. So I'm mostly looking for an answer I can give to them to explain this apparent difference.

Thanks

Re: Question about Polynomial Fitting and Degree

Posted: Thu Jul 02, 2009 8:15 am
by narcis
Hi Aaron,

Sorry for the delayed reply.

I'm not a math guy either. However, after checking PolyFitting implementation I think you are right, degree here indicates the "number of degrees" or number of terms the equation has as you already said. If math specialists in your company want to have a deeper insight on function's implementation they may do so disassembling TeeChart.dll using Red Gate's .NET Reflector.