Join us for
RADAR: AI Edition

SACOBRA (version 1.2)

trainMQRBF: Fit multiquadric RBF model to training data for d>1.

Description

The model for a point z=(z1,...,zd) is fitted using n sample points x1,...,xn

s(z)=λ1Φ(||zx1||)+...+λnΦ(||zxn||)+c0+c1z1+...+cdzd

where Φ(r)=(1+(r/σ)2) denotes the multiquadrics radial basis function with width σ. The coefficients λ1,...,λn,c0,c1,...,cd are determined by this training procedure. This is for the default case squares==FALSE. In case squares==TRUE there are d additional pure square terms and the model is

ssq(z)=s(z)+cd+1z12+...+cd+dzd2 In case ptail==FALSE the polynomial tail (all coefficients ci) is omitted completely.

Usage

trainMQRBF(
  xp,
  U,
  ptail = TRUE,
  squares = FALSE,
  width,
  RULE = "One",
  widthFactor = 1,
  rho = 0,
  DEBUG2 = F
)

Arguments

xp

n points xi of dimension d are arranged in (n x d) matrix xp

U

vector of length n, containing samples u(xi) of the scalar function u to be fitted - or - (n x m) matrix, where each column 1,...,m contains one vector of samples uj(xi) for the m'th model, j=1,...,m

ptail

[TRUE] flag, see description

squares

[FALSE] flag, see 'Description'

width

[-1] either a positive real value which is the constant width σ for all Gaussians in all iterations, or -1. If -1, the appropriate width σ is calculated anew in each iteration with one of the rules RULE, based on the distribution of data points xp.

RULE

["One"] one out of ["One" | "Two" | "Three"], different rules for automatic estimation of width σ. Only relevant if width = -1,

widthFactor

[1.0] additional constant factor applied to each width σ

rho

[0.0] experimental: 0.0: interpolating, >0.0, approximating (spline-like) Gaussian RBFs

DEBUG2

[FALSE] if TRUE, save M and rhs on return value

Value

rbf.model, an object of class RBFinter, which is basically a list with elements:

coef

(n+d+1 x m) matrix holding in column m the coefficients for the m'th model: λ1,...,λn,c0,c1,...,cd. In case squares==TRUE it is an (n+2d+1 x m) matrix holding additionally the coefficients cd+1,...,cd+d.

xp

matrix xp

d

size of the polynomial tail. If length(d)==0 it means no polynomial tail will be used for the model. In case of ptail==T && squares==F d will be dimension+1 and in case of ptail==T && squares==T d will be 2*dimension+1

npts

number n of points xi

ptail

TRUE or FALSE (see description)

squares

TRUE or FALSE (see description)

width

the calculated width σ

type

"MQ"

Details

The linear equation system is solved via SVD inversion. Near-zero elements in the diagonal matrix D are set to zero in D1. This makes rank-deficient systems numerically stable.

See Also

trainCubicRBF, predict.RBFinter, interpRBF