A wraper to construct the derivative of correlation matrix with respect to correlation parameters
Description
This function wraps existing built-in routines to construct the
derivative of correlation matrix with respect to correlation parameters.
Usage
deriv_kernel(d, range, tail, nu, covmodel)
Arguments
d
a matrix or a list of distances returned from distance.
range
a vector of range parameters
tail
a vector of tail decay parameters
nu
a vector of smoothness parameters
covmodel
a list of two strings: family, form, where family indicates the family of covariance functions
including the Confluent Hypergeometric class, the Matérn class, the Cauchy class, the powered-exponential class. form indicates the
specific form of covariance structures including the isotropic form, tensor form, automatic relevance determination form.
family
CH
The Confluent Hypergeometric correlation function is given by
C(h)=Γ(ν)Γ(ν+α)U(α,1−ν,(βh)2),
where α is the tail decay parameter. β is the range parameter.
ν is the smoothness parameter. U(⋅) is the confluent hypergeometric
function of the second kind. For details about this covariance,
see Ma and Bhadra (2023; doi:10.1080/01621459.2022.2027775).
cauchy
The generalized Cauchy covariance is given by
C(h)={1+(ϕh)ν}−α/ν,
where ϕ is the range parameter. α is the tail decay parameter.
ν is the smoothness parameter with default value at 2.
matern
The Matérn correlation function is given by
C(h)=Γ(ν)21−ν(ϕh)νKν(ϕh),
where ϕ is the range parameter. ν is the smoothness parameter.
Kν(⋅) is the modified Bessel function of the second kind of order ν.
exp
This is the Matérn correlation with ν=0.5. This covariance should be specified as matern with smoothness parameter ν=0.5.
matern_3_2
This is the Matérn correlation with ν=1.5.
This covariance should be specified as matern with smoothness parameter ν=1.5.
matern_5_2
This is the Matérn correlation with ν=2.5.
This covariance should be specified as matern with smoothness parameter ν=2.5.
powexp
The powered-exponential correlation function is given by
C(h)=exp{−(ϕh)ν},
where ϕ is the range parameter. ν is the smoothness parameter.
gauss
The Gaussian correlation function is given by
C(h)=exp(−ϕ2h2),
where ϕ is the range parameter.
form
isotropic
This indicates the isotropic form of covariance functions. That is,
C(h)=C0(∥h∥;θ),
where ∥h∥ denotes the
Euclidean distance or the great circle distance for data on sphere. C0(⋅) denotes
any isotropic covariance family specified in family.
tensor
This indicates the tensor product of correlation functions. That is,
C(h)=∏i=1dC0(∣hi∣;θi),
where d is the dimension of input space. hi is the distance along the ith input dimension. This type of covariance structure has been often used in Gaussian process emulation for computer experiments.
ARD
This indicates the automatic relevance determination form. That is,
C(h)=C0(∑i=1dϕi2hi2;θ),
where ϕi denotes the range parameter along the ith input dimension.
input = seq(0,1,length=10)
d = distance(input,input,type="isotropic",dtype="Euclidean")
dR = deriv_kernel(d,range=0.5,tail=0.2,nu=2.5,
covmodel=list(family="CH",form="isotropic"))