local_basis function

Construct a set of local basis functions

Construct a set of local basis functions

Construct a set of local basis functions based on pre-specified location and scale parameters.

local_basis( manifold = sphere(), loc = matrix(c(1, 0), nrow = 1), scale = 1, type = c("bisquare", "Gaussian", "exp", "Matern32"), res = 1, regular = FALSE ) radial_basis( manifold = sphere(), loc = matrix(c(1, 0), nrow = 1), scale = 1, type = c("bisquare", "Gaussian", "exp", "Matern32") )

Arguments

  • manifold: object of class manifold, for example, sphere
  • loc: a matrix of size n by dimensions(manifold) indicating centres of basis functions
  • scale: vector of length n containing the scale parameters of the basis functions; see details
  • type: either "bisquare", "Gaussian", "exp", or "Matern32"
  • res: vector of length n containing the resolutions of the basis functions
  • regular: logical indicating if the basis functions (of each resolution) are in a regular grid

Details

This functions lays out local basis functions in a domain of interest based on pre-specified location and scale parameters. If type is ``bisquare'', then

ϕ(u)=(1(uR)2)2I(u<R),ϕ(u)=(1(u/R)2)2I(u<R), \phi(u) = \left(1- \left(\frac{\| u \|}{R}\right)^2\right)^2 I(\|u\| < R),\phi(u) = (1- (|u|/R)^2)^2 I(|u| < R),

and scale is given by RR, the range of support of the bisquare function. If type is ``Gaussian'', then

ϕ(u)=exp(u22σ2),ϕ(u)=exp(u2/2σ2), \phi(u) = \exp\left(-\frac{\|u \|^2}{2\sigma^2}\right),\phi(u) = \exp(-|u|^2/2\sigma^2),

and scale is given by σ\sigma, the standard deviation. If type is ``exp'', then

ϕ(u)=exp(uτ),ϕ(u)=exp(u/τ), \phi(u) = \exp\left(-\frac{\|u\|}{ \tau}\right),\phi(u) = \exp(-|u|/ \tau),

and scale is given by τ\tau, the e-folding length. If type is ``Matern32'', then

ϕ(u)=(1+3uκ)exp(3uκ),ϕ(u)=(1+3u/κ)exp(3u/κ), \phi(u) = \left(1 + \frac{\sqrt{3}\|u\|}{\kappa}\right)\exp\left(-\frac{\sqrt{3}\| u \|}{\kappa}\right),\phi(u) = (1 + \sqrt{3}|u|/\kappa)\exp(-\sqrt{3}|u|/\kappa),

and scale is given by κ\kappa, the function's scale.

Examples

library(ggplot2) G <- local_basis(manifold = real_line(), loc=matrix(1:10,10,1), scale=rep(2,10), type="bisquare") ## Not run: show_basis(G)

See Also

auto_basis for constructing basis functions automatically, and show_basis for visualising basis functions.

  • Maintainer: Andrew Zammit-Mangion
  • License: GPL (>= 2)
  • Last published: 2024-07-16