Extension of the BSpline class to compute a least squares spline approximation to data points.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
[SerializableAttribute]
public class BsLeastSquares : BSpline
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class BsLeastSquares _
	Inherits BSpline
Visual C++
[SerializableAttribute]
public ref class BsLeastSquares : public BSpline

Remarks

Let's make the identifications

n = xData.Length

x = xData

f = yData

m = nCoef

k = order

For convenience, we assume that the sequence x is increasing, although the class does not require this.

By default, k = 4, and the knot sequence we select equally distributes the knots through the distinct {x_i}'s. In particular, the m + k knots will be generated in [x_1, x_n] with k knots stacked at each of the extreme values. The interior knots will be equally spaced in the interval.

Once knots {\bf t} and weights w are determined, then the spline least-squares fit to the data is computed by minimizing over the linear coefficients a_j

\sum_{i=0}^{n-1} 
            {w_i\biggl[f_i-\sum_{j=1}^{m}{a_jB_j(x_i)}\biggr]^2}

where the B_j, j = 1, ..., m are a (B-spline) basis for the spline subspace.

This algorithm is based on the routine L2APPR by deBoor (1978, p. 255).

Inheritance Hierarchy

System..::.Object
Imsl.Math..::.BSpline
Imsl.Math..::.BsLeastSquares

See Also