bases {qkerntool} | R Documentation |
qKernel Functions
Description
The kernel generating functions provided in qkerntool.
The Non Linear Kernel k(x,y) = \frac{1}{2(1-q)}(q^{-\alpha||x||^2}+q^{-\alpha||y||^2}-2q^{-\alpha x'y})
.
The Gaussian kernel k(x,y) =\frac{1}{1-q} (1-q^{(||x-y||^2/\sigma)})
.
The Laplacian Kernel k(x,y) =\frac{1}{1-q} (1-q^{(||x-y||/\sigma)})
.
The Rational Quadratic Kernel k(x,y) =\frac{1}{1-q} (1-q^{\frac{||x-y||^2}{||x-y||^2+c}})
.
The Multiquadric Kernel k(x,y) =\frac{1}{1-q} (q^c-q^{\sqrt{||x-y||^2+c}})
.
The Inverse Multiquadric Kernel k(x,y) =\frac{1}{1-q} (q^{-\frac{1}{c}}-q^{-\frac{1}{\sqrt{||x-y||^2+c}}})
.
The Wave Kernel k(x,y) =\frac{1}{1-q} (q^{-1}-q^{-\frac{\theta}{||x-y||}\sin{\frac{||x-y||}{\theta}}})
.
The d Kernel k(x,y) = \frac{1}{1-q}[1-q^(||x-y||^d)]
.
The Log Kernel k(x,y) =\frac{1}{1-q} [1-q^ln(||x-y||^d+1)]
.
The Cauchy Kernel k(x,y) =\frac{1}{1-q} (q^{-1}-q^{-\frac{1}{1+||x-y||^2/\sigma}})
.
The Chi-Square Kernel k(x,y) =\frac{1}{1-q} (1-q^{\sum{2(x-y)^2/(x+y)} \gamma})
.
The Generalized T-Student Kernel k(x,y) =\frac{1}{1-q} (q^{-1}-q^{-\frac{1}{1+||x-y||^d}})
.
Usage
rbfbase(sigma=1,q=0.8)
nonlbase(alpha = 1,q = 0.8)
laplbase(sigma = 1, q = 0.8)
ratibase(c = 1, q = 0.8)
multbase(c = 1, q = 0.8)
invbase(c = 1, q = 0.8)
wavbase(theta = 1,q = 0.8)
powbase(d = 2, q = 0.8)
logbase(d = 2, q = 0.8)
caubase(sigma = 1, q = 0.8)
chibase(gamma = 1, q = 0.8)
studbase(d = 2, q = 0.8)
Arguments
q |
for all the qkernel function. |
sigma |
for the Radial Basis qkernel function "rbfbase" , the Laplacian qkernel function "laplbase" and the Cauchy qkernel function "caubase". |
alpha |
for the Non Linear qkernel function "nonlbase". |
c |
for the Rational Quadratic qkernel function "ratibase" , the Multiquadric qkernel function "multbase" and the Inverse Multiquadric qkernel function "invbase". |
theta |
for the Wave qkernel function "wavbase". |
d |
for the d qkernel function "powbase" , the Log qkernel function "logbase" and the Generalized T-Student qkernel function "studbase". |
gamma |
for the Chi-Square qkernel function "chibase". |
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(e.g., qkgda
, qkpca
etc).
Value
Return an S4 object of class qkernel
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
qkfunc <- rbfbase(sigma=1,q=0.8)
qkfunc
qpar(qkfunc)
## create two vectors
x <- rnorm(10)
y <- rnorm(10)
## calculate dot product
qkfunc(x,y)