Polyharmonic spline
Polyharmonic splines are used for function approximation and data interpolation. They are very useful for interpolating and fitting scattered data in many dimensions. A special case is the thin plate spline.[1][2]
Contents
Definition
A polyharmonic spline is a linear combination of polyharmonic radial basis functions (RBFs) (denoted by ) plus an optional linear term:
-
-
(1)
-
where
is a real-valued vector of
independent variables,
are
vectors of the same size as
(often called centers) that the curve or surface must interpolate
are the
weights of the RBFs.
are the
weights of the polynomial.
- The linear polynomial with the weighting factors
improves the interpolation close to the "boundary" and especially the extrapolation "outside" of the centers
. If this is not desired, this term can also be removed (see also figure below).
The polyharmonic RBFs are of the form:
Other values of the exponent are not useful (such as
), because a solution of the interpolation problem might not exist. To avoid problems at
(since
), the polyharmonic RBFs with the natural logarithm might be implemented as:
The weights and
are determined such that the function interpolates
given points
(for
) and fulfills the
orthogonality conditions:
To compute the weights, a symmetric linear system of equations has to be solved:
-
-
(2)
-
where
Under very mild conditions (essentially, that at least points are not in a subspace; e.g. for
that at least 3 points are not on a straight line), the matrix of the linear system of equations is nonsingular and therefore a unique solution of the equation system exists. The computed weights allow evaluation of the spline for any
using equation (1).
Many practical details to implement and use polyharmonic splines are given in Fasshauer.[3] In Iske[4] polyharmonic splines are treated as special cases of other multiresolution methods in scattered data modelling.
Reason for the name "polyharmonic"
A polyharmonic equation is a partial differential equation of the form for any natural number
. For example, the biharmonic equation is
and the triharmonic equation is
. All the polyharmonic radial basis functions are solutions of a polyharmonic equation (or more accurately, a modified polyharmonic equation with a Dirac delta function on the right hand side instead of 0). For example, the thin plate radial basis function is a solution of the modified 2-dimensional biharmonic equation. [5] Applying the 2D Laplace operator (
) to the thin plate radial basis function
either by hand or using a computer algebra system shows that
. Applying the Laplace operator to
(this is
) yields 0. But 0 is not exactly correct. To see this, replace
with
(where
is some small number tending to 0). The Laplace operator applied to
yields
. For
, the right hand side of this equation approaches infinity as
approaches 0. For any other
, the right hand side approaches 0 as
approaches 0. This indicates that the right hand side is a Dirac delta function. A computer algebra system will show that
So the thin plate radial basis function is a solution of the equation .
Applying the 3D Laplacian () to the biharmonic RBF
yields
and applying the 3D
operator to the triharmonic RBF
yields
. Letting
and computing
again indicates that the right hand side of the PDEs for the biharmonic and triharmonic RBFs are Dirac delta functions. Since
the exact PDEs satisfied by the biharmonic and triharmonic RBFs are and
.
Polyharmonic smoothing splines
Polyharmonic splines solve the minimization problem
-
-
(3)
-
where is the vector of all
th order partial derivatives of
. For example, in 2D
and
and in 3D
. In 2D
, making the integral the simplified thin plate energy functional.
To show that polyharmonic splines solve equation (3), the fitting term must be transformed into an integral using the definition of the Dirac delta function:
So equation (3) can be written as the functional
where is a multi-index that ranges over all partial derivatives of order
for
. In order to apply the Euler-Lagrange equation for a single function of multiple variables and higher order derivatives, the quantities
and
are needed. Inserting these quantities into the E-L equation shows that
-
-
(4)
-
Let be a polyharmonic spline as defined by equation (1). The following calculations will show that
satisfies (4). Applying the
operator to equation (1) yields
where
, and
. So
-
-
(5)
-
is equivalent to (4). Setting
-
-
(6)
-
(which implies interpolation if ) solves equation (5) and hence solves (4). Combining the definition of
in equation (1) with equation (6) results in almost the same linear system as equation (2) except that the matrix
is replaced with
where
is the
identity matrix. For example, for the 3D triharmonic RBFs,
is replaced with
.
Examples
The next figure shows the interpolation through four points (marked by "circles") using different types of polyharmonic splines. The "curvature" of the interpolated curves grows with the order of the spline and the extrapolation at the left boundary (x < 0) is reasonable. The figure also includes the radial basis functions phi = exp(-r2) which gives a good interpolation as well. Finally, the figure includes also the non-polyharmonic spline phi = r2 to demonstrate, that this radial basis function is not able to pass through the predefined points (the linear equation has no solution and is solved in a least squares sense).
The next figure shows the same interpolation as in the first figure, with the only exception that the points to be interpolated are scaled by a factor of 100 (and the case phi = r2 is no longer included). Since phi = (scale*r)k = (scalek)*rk, the factor (scalek) can be extracted from matrix A of the linear equation system and therefore the solution is not influenced by the scaling. This is different for the logarithmic form of the spline, although the scaling has not much influence. This analysis is reflected in the figure, where the interpolation shows not much differences. Note, for other radial basis functions, such as phi = exp(-k*r2) with k=1, the interpolation is no longer reasonable and it would be necessary to adapt k.
The next figure shows the same interpolation as in the first figure, with the only exception that the polynomial term of the function is not taken into account (and the case phi = r2 is no longer included). As can be seen from the figure, the extrapolation for x < 0 is no longer as "natural" as in the first figure for some of the basis functions. This indicates, that the polynomial term is useful if extrapolation occurs.
Discussion
The main advantage of polyharmonic spline interpolation is that usually very good interpolation results are obtained for scattered data without performing any "tuning", so automatic interpolation is feasible. This is not the case for other radial basis functions. For example, the Gaussian function needs to be tuned, so that
is selected according to the underlying grid of the independent variables. If this grid is non-uniform, a proper selection of
to achieve a good interpolation result is difficult or impossible.
Main disadvantages are:
- To determine the weights, a linear system of equations must be solved, which is non-sparse. The solution of a non-sparse linear system becomes no longer practical if the dimension n is larger as about 1000 (since the storage requirements are O(n2) and the number of operations to solve the linear system is O(n3). For example n=10000 requires about 100 Mbyte of storage and 1000 Gflops of operations).
- To perform the interpolation of M data points requires operations in the order of O(M*N). In many applications, like image processing, M is much larger than N, and if both numbers are large, this is no longer practical.
Recently, methods have been developed to overcome the aforementioned difficulties. For example Beatson et al.[6] present a method to interpolate polyharmonic splines at one point in 3 dimensions in O(log(N)) instead of O(N).
See also
- Inverse distance weighting
- Radial basis function
- Subdivision surface (emerging alternative to spline-based surfaces)
- Spline
References
<templatestyles src="Reflist/styles.css" />
Cite error: Invalid <references>
tag; parameter "group" is allowed only.
<references />
, or <references group="..." />
- ↑ R.L. Harder and R.N. Desmarais: Interpolation using surface splines. Journal of Aircraft, 1972, Issue 2, pp. 189-191
- ↑ J. Duchon: Splines minimizing rotation-invariant semi-norms in Sobolev spaces. Constructive Theory of Functions of Several Variables, W. Schempp and K. Zeller (eds), Springer, Berlin, pp.85-100
- ↑ G.F. Fasshauer G.F.: Meshfree Approximation Methods with MATLAB. World Scientific Publishing Company, 2007, ISPN-10: 9812706348
- ↑ A. Iske: Multiresolution Methods in Scattered Data Modelling, Lecture Notes in Computational Science and Engineering, 2004, Vol. 37, ISBN 3-540-20479-2, Springer-Verlag, Heidelberg.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ R.K. Beatson, M.J.D. Powell, and A.M. Tan A.M.: Fast evaluation of polyharmonic splines in three dimensions. IMA Journal of Numerical Analysis, 2007, 27, pp. 427-450.