Main Content

B-Splines and Smoothing Splines

In this toolbox, the definition of a B-spline with knotstj, ...,tj+kis given by

B j , k ( x ) = B ( x | t j , ... , t j + k ) = ( t j + k t j ) [ t j , ... , t j + k ] ( x ) + k 1 .

This is only one of several reasonable normalizations of the B-spline. It is chosen so that

j = 1 n B j , k ( x ) = 1 , t k x t n + 1 .

But, instead of trying to understand the above formula for the B-spline, look at the reference pages for the GUIbspliguifor some of the basic properties of the B-spline, and use that GUI to gain some firsthand experience with this intriguing function. Its most important property for the purposes of this toolbox is also the reason the letter B is in its name:

Every space of (univariate) piecewise-polynomials of a given order has aBasis consisting ofB-splines (hence the “B” in B-spline).

B-Spline Properties

BecauseBj,kis nonzero only on the interval (tj..tj+k), the linear system for the B-spline coefficients of the spline to be determined, by interpolation or least squares approximation, or even as the approximate solution of some differential equation, isbanded, making the solving of that linear system particularly easy. For example, to construct a splinesof orderkwith knot sequencet1t2≤··· ≤tn+kso thats(xi)=yifori=1, ...,n, use the linear system

j = 1 n B j , k ( x i ) a j = y i i = 1 : n

for the unknown B-spline coefficientsajin which each equation has at mostknonzero entries.

Also, many theoretical facts concerning splines are most easily stated and/or proved in terms of B-splines. For example, it is possible to match arbitrary data at sites x 1 < < x n uniquely by a spline of orderkwith knot sequence(t1, ..., tn+k)if and only ifBj,k(xj)≠0for allj(Schoenberg-Whitney Conditions). Computations with B-splines are facilitated by stablerecurrence relations

B j , k ( x ) = x t j t j + k 1 t j B j , k 1 ( x ) + t j + k x t j + k t j + 1 B j + 1 , k 1 ( x )

which are also of help in theconversion from B-form to ppform. Thedual functional

a j ( s ) : = i < k ( D ) k i 1 Ψ j ( τ ) D i s ( τ )

provides a useful expression for thejth B-spline coefficient of the splinesin terms of its value and derivatives at an arbitrary site τ betweentjandtj+k, and with ψj(t):=(tj+1–t)··· (tj+k–1–t)/(k1) !它can be used to show thataj(s) is closely related toson the interval [tj..tj+k], and seems the most efficient means for converting from ppform to B-form.

Variational Approach and Smoothing Splines

The aboveconstructiveapproachis not the only avenue to splines. In thevariationalapproach, a spline is obtained as abest interpolant, e.g., as the function with smallestm导数在所有那些匹配的规定function values at certain sites. As it turns out, among the many such splines available, only those that are piecewise-polynomials or, perhaps, piecewise-exponentials have found much use. Of particular practical interest is thesmoothing splines=sp,对于给定数据(xi,yi) withx∊[a..b], alli, and given corresponding positive weightswi, and for givensmoothing parameterp,minimizes

p i w i | y i f ( x i ) | 2 + ( 1 p ) a b | D m f ( t ) | 2 d t

over all functionsfwithmderivatives. It turns out that the smoothing splinesis a spline of order2mwith a break at every data site. The smoothing parameter,p, is chosen artfully to strike the right balance between wanting theerror measure

E ( s ) = i w i | y i s ( x i ) | 2

small and wanting theroughness measure

F ( D m s ) = a b | D m s ( t ) | 2 d t

small. The hope is thatscontains as much of the information, and as little of the supposednoise, in the data as possible. One approach to this (used inspaps) is to makeF(Dmf)as small as possible subject to the condition thatE(f)be no bigger than a prescribed tolerance. For computational reasons,spapsuses the (equivalent) smoothing parameterρ=p/(1–p), i.e., minimizesρE(f) +F(Dmf). Also, it is useful at times to use the more flexible roughness measure

F ( D m s ) = a b λ ( t ) | D m s ( t ) | 2 d t

with λ a suitable positive weight function.

Related Topics