Question about Polynomial Fitting and Degree

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Aaron Peronto
Newbie
Newbie
Posts: 29
Joined: Wed Jun 20, 2007 12:00 am

Question about Polynomial Fitting and Degree

Post by Aaron Peronto » Wed Jun 10, 2009 7:27 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Question about Polynomial Fitting and Degree

Post by Narcís » Thu Jul 02, 2009 8:15 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply