gausskernel: Gaussian RBF kernel

Description Usage Arguments Value

Description

Computes the Gaussian RBF kernel k(x,x') = exp(-|x-x'|^2/(2*sigma^2)).

Usage

1
gausskernel(x, sigma = 1, x2)

Arguments

x

Input matrix of covariates with samples in rows.

sigma

Bandwidth of the Gaussian RBF kernel. Default is 1.

x2

(Optional) a second matrix of covariates with samples in rows.

Value

If x2 is provided, returns the kernel matrix crossing samples in x and samples in x2. If x2 is not provided, returns the kernel Gram matrix of x versus itself.


jpvert/kmr documentation built on May 20, 2019, 7:56 a.m.