API

API

Functions

interpolate(method, points, samples; metric = Euclidean(), returnRBFmatrix = false; smooth = false)

Create an interpolation of the data in samples sampled at the locations defined in points based on the interpolation method method. metric is any of the metrics defined by the Distances package. The RBF matrix used for solving the weights can be returned with the boolean returnRBFmatrix. Note that this option is only valid for RadialBasisFunction interpolations.

points should be an $n×k$ matrix, where $n$ is dimension of the sampled space and $k$ is the number of points. This means that each column in the matrix defines one point.

samples is an $k×m$ array, where $k$ is the number of sampled points (same as for points) and $m$ is the dimension of the sampled data.

The RadialBasisFunction interpolation supports the use of unique RBF functions and widths for each sampled point by supplying method with a vector of interpolation methods of length $k$.

The RadialBasisFunction interpolation also supports smoothing of the data points using ridge regression. All points can be smoothed equally supplying a scalar value, alternatively each point can be smoothed independently by supplying a vector of smoothing values. Note that it is no longer interpolating when using smoothing.

The returned ScatteredInterpolant object can be passed to evaluate to interpolate the data to new points.

source
evaluate(itp, points)

Evaluate an interpolation object itp at the locations defined in points.

points should be an $n×k$ matrix, where $n$ is dimension of the sampled space and $k$ is the number of points. This means that each column in the matrix defines one point.

source

Types

Radial Basis Functions

Multiquadratic(ɛ = 1)

Define a Multiquadratic Radial Basis Function

\[ϕ(r) = \sqrt{1 + (ɛr)^2}\]
source
InverseMultiquadratic(ɛ = 1)

Define an Inverse Multiquadratic Radial Basis Function

\[ϕ(r) = \frac{1}{\sqrt{1 + (ɛr)^2}}\]
source
Gaussian(ɛ = 1)

Define a Gaussian Radial Basis Function

\[ϕ(r) = e^{-(ɛr)^2}\]
source
InverseQuadratic(ɛ = 1)

Define an Inverse Quadratic Radial Basis Function

\[ϕ(r) = \frac{1}{1 + (ɛr)^2}\]
source
Polyharmonic(k = 1)

Define a Polyharmonic Spline Radial Basis Function

\[ϕ(r) = r^k, k = 1, 3, 5, ... \\ ϕ(r) = r^k ln(r), k = 2, 4, 6, ...\]
source
ThinPlate()

Define a Thin Plate Spline Radial Basis Function

\[ϕ(r) = r^2 ln(r)\]

This is a shorthand for Polyharmonic(2).

source
GeneralizedMultiquadratic(ɛ, β, degree)

Define a generalized Multiquadratic Radial Basis Function

\[ϕ(r) = (1 + (ɛ*r)^2)^β\]

Results in a positive definite system for a 'degree' of ⌈β⌉ or higher.

source
GeneralizedPolyharmonic(k, degree)

Define a generalized Polyharmonic Radial Basis Function

\[ϕ(r) = r^k, k = 1, 3, 5, ... \\ ϕ(r) = r^k ln(r), k = 2, 4, 6, ...\]

Results in a positive definite system for a 'degree' of ⌈k/2⌉ or higher for k = 1, 3, 5, ... and of exactly k + 1 for k = 2, 4, 6, ...

source

Inverse Distance Weighting (Shepard)

Shepard(P = 2)

Standard Shepard interpolation with power parameter P.

source

Nearest Neighbor

NearestNeigbor()

Nearest neighbor interpolation.

source