09-09-2005 02:46 AM
09-09-2005 03:18 AM
09-09-2005 03:44 AM
09-09-2005 02:44 PM
The attached example is based on the demonstration vi Regressions Demo.vi
Here the input data has been fixed so you can manually test various fit types and algorithims against one data set. I have tried to chose a data set that you can readily qualify yourself.
You will see that generally as you increase the number of orders the 'goodness of fit' indicated by the MSE value tends to decrease. As indicated in the previous hyper link there are alternative strategies which can give better results for different datatypes.
09-09-2005 09:49 PM
09-10-2005 02:22 AM
Here is the example (re-written, as it would not save to previous version) for Labview 7.0
The 7.1 version attached previously was missing the data set, so if you want to try the example please bear this in mind (you can copy the data from the version 7.0 example to the 7.1 example or fill in your own).
09-11-2005 03:18 AM
09-11-2005 04:24 AM
There are a number of different techniques for dermining the 'goodness of fit'.
The example shown is taken directly from the National Instruments (NI) example and is thier default measure. In most cases it's satisfactory, you are of course at liberty to implement your own measure by implementing your own code.
Take a look at the link provided, I think you will find it very informative.
09-11-2005 06:08 AM
09-11-2005 12:06 PM
Try a few orders and look at the residual in a new x-y graph. Once there is no perceptible trend left in the residual, increasing the polynomial order would be meaningless.
Often, one polynomial coefficient is dominant. For example, the height of a dropping ball is mostly quadratic, but if measured over a huge range (e.g. dropped from a high flying airplane), you would need higher order terms to account for changes in air density, air resistance as a function of speed (laminar vs turbulent), gravitiy as a function of height, etc. If you now want to describe the trajectory of a falling meteorite, it gets even more complex due to the evaporative loss in mass, for example. However, at one point in the analysis, a polynomial fit is no longer sufficient because all these terms might be described by a more precise theory that is not polynomial at all.
If you have a real physical process, you should fit with a model that has a theoretical foundation and makes sense! It would make no sense to e.g. fit an exponential decay with a polynomial, even if a 5th order polynomial looks very good. 😉 An exponential fit will give you the amplitude and damping factors, while a polynomial fit only gives you a buch of meaningless terms.
It is always best to fit to a real theoretical model if available. LabVIEW has all the tools to do it (Levenberg Marquardt, General LS fit, etc.). 😄
Good luck!