kernCompute: Compute the kernel given the parameters and X.

Description Usage Arguments Details Value See Also Examples

Description

Compute the kernel given the parameters and X.

Usage

1
2
  kernCompute(kern, x, x2)
  kernDiagCompute(kern, x)

Arguments

kern

kernel structure to be computed.

x

first or only input data matrix (rows are data points) to the kernel computation.

x2

(optional) second input matrix to the kernel computation (forms the columns of the kernel).

Details

K <- kernCompute(kern, X) computes a kernel matrix for the given kernel type given an input data matrix.

K <- kernCompute(kern, X1, X2) computes a kernel matrix for the given kernel type given two input data matrices, one for the rows and one for the columns.

K <- kernDiagCompute(kern, X) computes the diagonal of a kernel matrix for the given kernel.

K <- *X*kernCompute(kern1, kern2, X) K <- *X*kernCompute(kern1, kern2, X1, X2) same as above, but for cross combinations of two kernels, kern1 and kern2.

Value

K

computed elements of the kernel structure.

Kd

vector containing computed diagonal elements of the kernel structure.

See Also

kernCreate

Examples

1
2
kern <- kernCreate(1, 'rbf')
K <- kernCompute(kern, as.matrix(3:8))

ahonkela/tigre documentation built on Aug. 6, 2021, 12:08 p.m.