cnds {qkerntool} | R Documentation |
CND Kernel Functions
Description
The kernel generating functions provided in qkerntool.
The Non Linear Kernel k(x,y) = [exp(\alpha ||x||^2)+exp(\alpha||y||^2)-2exp(\alpha x'y)]/2
.
The Polynomial kernel k(x,y) = [(\alpha ||x||^2+c)^d+(\alpha ||y||^2+c)^d-2(\alpha x'y+c)^d]/2
.
The Gaussian kernel k(x,y) = 1-exp(-||x-y||^2/\gamma)
.
The Laplacian Kernel k(x,y) = 1-exp(-||x-y||/\gamma)
.
The ANOVA Kernel k(x,y) = n-\sum exp(-\sigma (x-y)^2)^d
.
The Rational Quadratic Kernel k(x,y) = ||x-y||^2/(||x-y||^2+c)
.
The Multiquadric Kernel k(x,y) = \sqrt{(||x-y||^2+c^2)-c}
.
The Inverse Multiquadric Kernel k(x,y) = 1/c-1/\sqrt{||x-y||^2+c^2}
.
The Wave Kernel k(x,y) = 1-\frac{\theta}{||x-y||}\sin\frac{||x-y||}{\theta}
.
The d Kernel k(x,y) = ||x-y||^d
.
The Log Kernel k(x,y) = \log(||x-y||^d+1)
.
The Cauchy Kernel k(x,y) = 1-1/(1+||x-y||^2/\gamma)
.
The Chi-Square Kernel k(x,y) = \sum{2(x-y)^2/(x+y)}
.
The Generalized T-Student Kernel k(x,y) = 1-1/(1+||x-y||^d)
.
The normal Kernel k(x,y) = ||x-y||^2
.
Usage
nonlcnd(alpha = 1)
polycnd(d = 2, alpha = 1, c = 1)
rbfcnd(gamma = 1)
laplcnd(gamma = 1)
anocnd(d = 2, sigma = 1)
raticnd(c = 1)
multcnd(c = 1)
invcnd(c = 1)
wavcnd(theta = 1)
powcnd(d = 2)
logcnd(d = 2)
caucnd(gamma = 1)
chicnd( )
studcnd(d = 2)
norcnd()
Arguments
alpha |
for the Non Linear cndkernel function "nonlcnd" and the Polynomial cndkernel function "polycnd". |
gamma |
for the Radial Basis cndkernel function "rbfcnd" and the Laplacian cndkernel function "laplcnd" and the Cauchy cndkernel function "caucnd". |
sigma |
for the ANOVA cndkernel function "anocnd". |
theta |
for the Wave cndkernel function "wavcnd". |
c |
for the Rational Quadratic cndkernel function "raticnd", the Polynomial cndkernel function "polycnd", the Multiquadric cndkernel function "multcnd" and the Inverse Multiquadric cndkernel function "invcnd". |
d |
for the Polynomial cndkernel function "polycnd", the ANOVA cndkernel function "anocnd", the cndkernel function "powcnd", the Log cndkernel function "logcnd" and the Generalized T-Student cndkernel function "studcnd". |
Details
The kernel generating functions are used to initialize a kernel
function which calculates the kernel function value between two feature vectors in a
Hilbert Space. These functions can be passed as a qkernel
argument on almost all
functions in qkerntool.
Value
Return an S4 object of class cndkernel
which extents the
function
class. The resulting function implements the given
kernel calculating the kernel function value between two vectors.
qpar |
a list containing the kernel parameters (hyperparameters) used. |
The kernel parameters can be accessed by the qpar
function.
Author(s)
Yusen Zhang
yusenzhang@126.com
See Also
Examples
cndkfunc <- rbfcnd(gamma = 1)
cndkfunc
qpar(cndkfunc)
## create two vectors
x <- rnorm(10)
y <- rnorm(10)
## calculate dot product
cndkfunc(x,y)