Which curve fit should I use?Document ID: DQ065
Relevant to following products: Stingray WorkOut 1.5 WorkOut 2.0 Manta
Document description: How To: Choose a curve fit method...
The Cubic Spline may be used in all instances, but its purpose is more to produce a cosmetic plot through data points which are considered to be a true fit already, rather than to smooth the data according to any analytic model. It is capable of producing a curve which passes through all data points, but if the data is erratic this may produce apparently excessive curvature between some points.
The other curve fit methods are used to smooth the data according to some analytic function which matches the theoretical model of the experiment.
If the slope changes sign the curve fit can only be a polynomial (of order > 2). See below.
If the curve is getting progressively flatter at low or high values it is probably not a polynomial.
For non-polynomial fits the slope must remain the same sign.
If steep (up or down) in the middle and getting progressively flatter at both low and high values then try a 4 Parameter fit, and then possibly a 5 Parameter fit if this is better. For these fits the slope must remain the same sign.
If steep (up or down) at start and getting progressively flatter at high values then try a saturating exponential fit. The slope must remain the same sign.
If not very steep (up or down) at start and getting rapidly steeper for higher values then try an expanding exponential fit. The slope must remain the same sign.
When the relationship is a straight line (within experimental error) then try a linear fit.
If the relationship is a line which curves in one direction only (up or down) then basically try a polynomial fit of order 2.
If the relationship is a line which curves one way and then the other, then basically try a polynomial fit of order 3.
Similarly if the relationship is a curve which has 3 or 4 or n distinct opposing bends, then try basically a polynomial or order 4 or 5 or (n+1).
However, the variation of the curvature also affects the degree of the polynomial. For instance, if an apparently simple curve varies from curving gently to curving sharply, then it may need extra orders of polynomial to fit it.
In general, polynomials of low order should be tried first, and the order increased as long as the fit improves noticeably (allowing for experimental error). The order should not be increased beyond the necessary value.
In fact, if there are n data points, a polynomial of order n-1 will always be able to fit exactly. A polynomial of order greater than this should not be used.
It is also important to realise that a given set of n data points may exactly fit a polynomial of lower order than n-1. For example, all the data points may fortuitously lie exactly on a straight line or on a parabola etc. In this case a polynomial of order greater than the exact fit may result in problems, as some of its higher coefficients will be zero, resulting in possible divide-by-zero errors.
Furthermore, even for data where an exact fit is not achieved, it is always possible that the best fit is obtained when the highest order coefficient is fortuitously zero. This may also result in a divide-by-zero error.
These divide-by-zero errors may occur when back fitting is implemented − i.e. when the fitted x value for a given y value is calculated.
Certain experimental data may conform to a model with a specific mathematical function, which is derived from the theory of the experiment. Examples of such curve fits are the Michaelis-Menten and Lineweaver-Burk methods.
DQ010: My Cubic Spline has a kink in it
How To: Use Cubic Spline with non-linear data…
DQ023: Can I extrapolate with the Cubic Spline?
How to: Allow/disallow extrapolation with a Cubic Spline…
DQ024: Why are the MSE and SS of my Cubic Spline large?
How is the MSE and SS of Cubic Spline calculated?