JMSLTM Numerical Library 6.1

com.imsl.math
Class CsSmooth

java.lang.Object
  extended by com.imsl.math.Spline
      extended by com.imsl.math.CsSmooth
All Implemented Interfaces:
Serializable, Cloneable

public class CsSmooth
extends Spline

Extension of the Spline class to construct a smooth cubic spline from noisy data points.

Class CsSmooth is designed to produce a C^2 cubic spline approximation to a data set in which the function values are noisy. This spline is called a smoothing spline. It is a natural cubic spline with knots at all the data abscissas x = xData, but it does not interpolate the data (x_i, f_i). The smoothing spline S is the unique C^2 function that minimizes

intlimits_a^b {S''left( x right)^2 dx}

subject to the constraint

sumlimits_{i = 0}^{n-1} {left| {{{(Sleft( 
  {x_i } right) - f_i }) {w_i }}} right|} ^2  le sigma

where sigma is the smoothing parameter. The reader should consult Reinsch (1967) for more information concerning smoothing splines. CsSmooth solves the above problem when the user provides the smoothing parameter sigma. CsSmoothC2 attempts to find the "optimal" smoothing parameter using the statistical technique known as cross-validation. This means that (in a very rough sense) one chooses the value of sigma so that the smoothing spline (S_sigma) best approximates the value of the data at x_I, if it is computed using all the data except the i-th; this is true for all i = 0, ldots, n-1. For more information on this topic, we refer the reader to Craven and Wahba (1979).

See Also:
Example, Serialized Form

Field Summary
 
Fields inherited from class com.imsl.math.Spline
breakPoint, coef, EPSILON_LARGE
 
Constructor Summary
CsSmooth(double[] xData, double[] yData)
          Constructs a smooth cubic spline from noisy data using cross-validation to estimate the smoothing parameter.
CsSmooth(double[] xData, double[] yData, double[] weight)
          Constructs a smooth cubic spline from noisy data using cross-validation to estimate the smoothing parameter.
 
Method Summary
 
Methods inherited from class com.imsl.math.Spline
copyAndSortData, copyAndSortData, derivative, derivative, derivative, getBreakpoints, integral, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsSmooth

public CsSmooth(double[] xData,
                double[] yData)
Constructs a smooth cubic spline from noisy data using cross-validation to estimate the smoothing parameter. All of the points have equal weights.

Parameters:
xData - A double array containing the x-coordinates of the data. Values must be distinct.
yData - A double array containing the y-coordinates of the data. The arrays xData and yData must have the same length.

CsSmooth

public CsSmooth(double[] xData,
                double[] yData,
                double[] weight)
Constructs a smooth cubic spline from noisy data using cross-validation to estimate the smoothing parameter. Weights are supplied by the user.

Parameters:
xData - A double array containing the x-coordinates of the data. Values must be distinct.
yData - A double array containing the y-coordinates of the data. The arrays xData and yData must have the same length.
weight - A double array containing the relative weights. This array must have the same length as xData.

JMSLTM Numerical Library 6.1

Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.