Generate/TIME03.gif Spline Estimation


The Spline Estimation option in the Time menu or the Time toolbar offers seven important spline procedures including variable order B-splines and a constrained cubic for pure interpolation, and least-squares B-splines, a cross-validation smoothing cubic spline, and the smoothing non-uniform rational B-spline (NURBS). Primarily for the procedures that perform smoothing, first and second derivatives are available

This procedure is useful for both upsampling and downsampling since the range and number of output points are specified. Uniform data are not required and AutoSignal will automatically average samples with identical x values.

The input data and fitted spline are shown in an AutoSignal Graph for rapid visualization of the effectiveness of the spline model.

Smooth and Continuous Derivatives

A quadratic spline has a continuous first derivative. A cubic spline is smooth in the first derivative and continuous in the second derivative. A quartic spline is smooth in both first and second derivatives and continuous in the third derivative. If you need a smooth derivative, be sure you use a spline order two greater than the derivative desired.

Spline Algorithm

The Cubic option fits a cubic spline interpolant where the breakpoints or knots of the spline are the X values of the data. As such, the knots and order are fixed. Endpoint conditions are automatically determined, these corresponding to the not-a-knot condition described by de Boor, which requires that the third derivative of the spline be continuous at the second and next-to-last breakpoint. The spline passes exactly through each data point. For more details, see de Boor's CUBSPL (pages 55-59), or the routine CSINT in the IMSL library.

The Cubic constrnd option is similar, except that a method by Akima (H. Akima, "A New Method of Interpolation and Smooth Curve Fitting Based on Local Procedures, J. ACM 17, 1970, 589-602 or de Boor, p.53 or CSAKM in the IMSL library) is used to minimize the "wiggles" common to cubic splines. The wild swings observed when noisy data are fit to cubic splines do not occur with this algorithm. Again, the spline passes exactly through each data point.

The Cubic smooth option fits a smooth cubic spline to the data. The smoothing is automatically determined using a procedure known as cross-validation. Since the interpolant will not pass exactly through the data, AutoSignal reports a standard error (SE) and for this type of spline. For more information on smoothing splines, refer to deBoor's SMOOTH (p235-243), for cross validation to P. Craven and G. Wahba (1979), and to CSSCV in the IMSL library.

The B-Spline option fits the B-spline of a specified order using a knot sequence based upon the X-values of the data. The knots are thus fixed. Permissible orders range from 2 (quadratic) through order 8. The B-spline passes exactly through each data point. For more information, see de Boor's SPLINT (p204-208) or BSINT in the IMSL library.

The B-Spl Fix knots option offers a B-spline where the knots are not located at the X-values, but fixed in position, and lower in count than the number of data points. For this option, you must set both the order and the number of knots desired. The smaller the number of knots, the greater will be the smoothing of noisy data. AutoSignal reports a standard error (SE) and for this type of spline. This algorithm produces a least-squares minimization. For more information, refer to de Boor's L2APPR (p255-258) or to BSLSQ in the IMSL library.

The B-Spl Opt knots option is identical to the previous spline, except that the knots are now variable, and are shifted to further minimize the overall least squares fit. Again, you must set both the order and the number of knots desired and a standard error (SE) and r² will be reported. Due to its iterative nature, this algorithm is appreciably slower than all of the other spline options. With large data sets, it may be prohibitively slow. For more information, refer to de Boor's NEWNOT (p184-186,258-261) or to BSVLS in the IMSL library.

The NURBS option fits a non-uniform rational B-spline to the data. The knots are fixed at the X values of the data points. The order can vary from 2 to 8. Unlike the wild oscillations sometimes observed with the higher order B-splines, NURBS become smoother with increasing order. A NURBS by its nature is a smoothing spline, and does not pass exactly through the data points. A standard error (SE) and is thus reported. Because NURBS have become the model of choice for high-end 3D modeling applications, much information is available in the OpenGL materials. Another reference is W. T. Hewitt and D. Yi, "The NURBS Procedure Library", AGOCG, May 1992.

Order

The order can be set for the B-Spline options and the NURBS option. Orders can vary between 2 and 8. The cubic splines are obviously fixed at order 3.

Knots

The knots can only be set for the two least-squares B-spline options which allow variable knots. It is recommended that you start with a small number of knots, and increase the knot count until a satisfactory fit is obtained. The goodness of fit will improve with knot count, but this means little. A B-Spline with a count of fixed knots equal to the X values produces the standard B-spline, a perfect fit that passes exactly through each point.

Sectioning Data

You may enable or disable regions of data or individual points just as within AutoSignal’s main Section option. When the state of one or more points is changed, the spline is recomputed and the graph is updated.

Goodness of Fit Statistics

A standard error (SE) and are reported. These statistics are of limited use, although they do allow a comparison between a favored non-parametric fit and a parametric sine or damped sine component fit.

Output

The principal output will interpolate the spline model or Function. Mainly for the procedures that perform smoothing, it is also possible to directly interpolate the first or second derivative (1st Deriv, 2nd Deriv).

For the output, the number of elements n are generated between x start and x end. Up to 65536 values can be generated. The starting and ending X values should be at or within the range of the input data. The default values will perform a 2x upsampling within the x range of the data.

List

Generate/8943.gif The List Data option lists the index, time, and output in a three column table. The listing uses the AutoSignal text viewer facility.

Copy

Generate/8941.gif The Copy Data to Clipboard option copies the time and output values to the clipboard. Formats include full precision binary (for spreadsheets such as Excel) and ASCII (for pasting into text editors).

Save

Generate/8942.gif The Save Data to Disk option writes the time and output values to a supported file format. These formats include ASCII, Excel 97, Excel 95, Lotus WK3, Lotus WK1, SPSS, or Systat.

Production Facility

Generate/8946.gif The AutoSignal Automation facility allows unattended processing of large numbers of data sets. The data sets can be consolidated in an Excel file or acquired using a DLL. The graphs can be exported to an MS Word RTF file, while the processed data can be exported to an Excel 95 or Excel 97 file.

Evaluation

Generate/8958.gif The Evaluation option offers the means to more extensively evaluate the spline model. The evaluation can be be direct, or the computation can consist of first or second derivatives, roots, or integrated areas. This option can be used to generate a table or file of any size using a generated X grid or by importing X data from supported file formats.

Generate/8957.gif Residuals

The Residuals button opens an AutoSignal Graph containing the residuals from the spline fit. The residuals are the difference between the data and spline model. This option is not available for the spline procedures that exactly interpolate the data.

Generate/8912.gif If an Automation Session is in progress, the Reset button can be used to terminate the automated processing.

Generate/8910.gif When exiting this procedure with the OK button, an option will be presented to update AutoSignal's main data table with the interpolated/smoothed data.



INDEX Savitzky-Golay Smoothing Filter Non-Parametric Estimation