MultiplicativeUDF.Kernel {rkriging}R Documentation

Multiplicative User Defined Function (UDF) Kernel

Description

This function specifies the Multiplicative kernel with the user defined R function.

Usage

MultiplicativeUDF.Kernel(lengthscale, kernel.function)

Arguments

lengthscale

a vector for the positive length scale parameters

kernel.function

user defined kernel function

Details

The Multiplicative User Defined Function (UDF) kernel is given by

k(r)=\prod_{i=1}^{p}f(r_{i}),

where f is the user defined kernel function that takes r_{i}^2 as input, where

r_{i}(x,x^{\prime})=\sqrt{\left(\frac{x_{i}-x_{i}^{\prime}}{l_{i}}\right)^2}

is the dimension-wise euclidean distances between x and x^{\prime} weighted by the length scale parameters l_{i}'s.

Value

A Multiplicative User Defined Function (UDF) Kernel Class Object.

Author(s)

Chaofan Huang and V. Roshan Joseph

References

Duvenaud, D. (2014). The kernel cookbook: Advice on covariance functions.

Rasmussen, C. E. & Williams, C. K. (2006). Gaussian Processes for Machine Learning. The MIT Press.

See Also

UDF.Kernel, Get.Kernel, Evaluate.Kernel.

Examples

n <- 5
p <- 3
X <- matrix(rnorm(n*p), ncol=p)
lengthscale <- c(1:p)

kernel.function <- function(sqdist) {return (exp(-sqrt(sqdist)))} 

# approach 1
kernel <- MultiplicativeUDF.Kernel(lengthscale, kernel.function=kernel.function)
Evaluate.Kernel(kernel, X)

# approach 2
kernel <- Get.Kernel(lengthscale, type="MultiplicativeUDF", 
                     parameters=list(kernel.function=kernel.function))
Evaluate.Kernel(kernel, X) 


[Package rkriging version 1.0.1 Index]