cndkernmatrix {qkerntool} | R Documentation |
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 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 |
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:
-
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.)
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
## 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)