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", l = 1, d = 2)

Arguments

method

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

l

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

d

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

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')^d

We have intercept kernel when d=0, and linear kernel when d=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
kern_func_list <- list()
for (j in 1:nrow(kern_par)) {
  kern_func_list[[j]] <- generate_kernel(kern_par[j, ]$method,
                                         kern_par[j, ]$l,
                                         kern_par[j, ]$d)
}

statmlhb/CVEK documentation built on May 5, 2019, 3:47 a.m.