cndkernmatrix: CND Kernel Matrix functions

Description Usage Arguments Details Value Author(s) See Also Examples

Description

cndkernmatrix calculates the kernel matrix K_{ij} = k(x_i,x_j) or K_{ij} = k(x_i,y_j).

Usage

1
2
## S4 method for signature 'cndkernel'
cndkernmatrix(cndkernel, x, y = NULL)

Arguments

cndkernel

the cndkernel function to be used to calculate the CND kernel matrix. This has to be a function of class cndkernel, i.e. which can be generated either one of the build in kernel generating functions (e.g., rbfcnd nonlcnd etc.) or a user defined function of class cndkernel taking two vector arguments and returning a scalar.

x

a data matrix to be used to calculate the kernel matrix.

y

second data matrix to calculate the kernel matrix.

Details

Common functions used during kernel based computations.
The cndkernel parameter can be set to any function, of class cndkernel, which computes the kernel function value in feature space between two vector arguments. qkerntool provides more than 10 CND kernel functions which can be initialized by using the following functions:

(see example.)

Value

cndkernmatrix returns a conditionally negative definite matrix with a zero diagonal element.

Author(s)

Yusen Zhang
yusenzhang@126.com

See Also

nonlbase, rbfbase, laplbase, ratibase, multbase, invbase, wavbase, powbase, logbase, caubase, chibase, studbase

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## use the iris data
data(iris)
dt <- as.matrix(iris[ ,-5])

## initialize cndkernel function
lapl <- laplcnd(gamma = 1)
lapl

## calculate cndkernel matrix
cndkernmatrix(lapl, dt)

qkerntool documentation built on May 2, 2019, 6:11 a.m.