qkerntool (version 1.19)

cndkernmatrix: CND Kernel Matrix functions

Description

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

Usage

# S4 method for 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.

Value

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

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:

  • nonlcnd Non Linear cndkernel function

  • polycnd Polynomial cndkernel function

  • rbfcnd Gaussian cndkernel function

  • laplcnd Laplacian cndkernel function

  • anocnd ANOVA cndkernel function

  • raticnd Rational Quadratic cndkernel function

  • multcnd Multiquadric cndkernel function

  • invcnd Inverse Multiquadric cndkernel function

  • wavcnd Wave cndkernel function

  • powcnd d cndkernel function

  • logcnd Log cndkernel function

  • caucnd Cauchy cndkernel function

  • chicnd Chi-Square cndkernel function

  • studcnd Generalized T-Student cndkernel function

(see example.)

See Also

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

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab