generate_kernel: Generating A Single Kernel

Description Usage Arguments Details Value Author(s) References Examples

Description

Generate kernels for the kernel library.

Usage

1
generate_kernel(method = "rbf", Sigma = 0, l = 1, p = 2)

Arguments

method

(character) A character string indicating which kernel is to be computed.

Sigma

(matrix) The covariance matrix for neural network kernel.

l

(numeric) A numeric number indicating the hyperparameter (flexibility) of a specific kernel.

p

(integer) For polynomial, p is the power; for matern, v = p + 1 / 2; for rational, alpha = p.

Details

There are seven kinds of kernel available here. For convenience, we define r=\mid x-x'\mid.

Gaussian RBF Kernels

k_{SE}(r)=exp\Big(-\frac{r^2}{2l^2}\Big)

Matern Kernels

k_{Matern}(r)=\frac{2^{1-ν}}{Γ(ν)}\Big(\frac{√{2ν r}}{l}\Big)^ν K_ν \Big(\frac{√{2ν r}}{l}\Big)

Rational Quadratic Kernels

k_{RQ}(r)=\Big(1+\frac{r^2}{2α l^2}\Big)^{-α}

Polynomial Kernels

k(x, x')=(x \cdot x')^p

We have intercept kernel when p=0, and linear kernel when p=1.

Neural Network Kernels

k_{NN}(x, x')=\frac{2}{π}sin^{-1}\Big(\frac{2\tilde{x}^TΣ \tilde{x}'}{√{(1+2\tilde{x}^TΣ \tilde{x})(1+2\tilde{x}'^TΣ \tilde{x}')}}\Big)

Value

kern

(function) A function indicating the generated kernel.

Author(s)

Wenying Deng

References

The MIT Press. Gaussian Processes for Machine Learning, 2006.

Examples

1
2
3
4
5
6
7
kern_list <- list()
for (d in 1:nrow(kern_par)) {
  kern_list[[d]] <- generate_kernel(kern_par[d, ]$method,
                                    kern_par[d, ]$Sigma,
                                    kern_par[d, ]$l,
                                    kern_par[d, ]$p)
}

IrisTeng/CVEK documentation built on May 31, 2019, 4:50 p.m.