qkernels: qKernel Functions

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

Description

The kernel generating functions provided in qkerntool.
The Non Linear Kernel k(x,y) = \frac{1}{2(1-q)}(q^{-α||x||^2}+q^{-α||y||^2}-2q^{-α x'y}) .
The Gaussian kernel k(x,y) =\frac{1}{1-q} (1-q^{(||x-y||^2/σ)}).
The Laplacian Kernel k(x,y) =\frac{1}{1-q} (1-q^{(||x-y||/σ)}).

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^{√{||x-y||^2+c}}).
The Inverse Multiquadric Kernel k(x,y) =\frac{1}{1-q} (q^{-\frac{1}{c}}-q^{-\frac{1}{√{||x-y||^2+c}}}).
The Wave Kernel k(x,y) =\frac{1}{1-q} (q^{-1}-q^{-\frac{θ}{||x-y||}\sin{\frac{||x-y||}{θ}}}).
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/σ}}).
The Chi-Square Kernel k(x,y) =\frac{1}{1-q} (1-q^{∑{2(x-y)^2/(x+y)} γ}).
The Generalized T-Student Kernel k(x,y) =\frac{1}{1-q} (q^{-1}-q^{-\frac{1}{1+||x-y||^d}}).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

qkernmatrix, cndkernmatrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

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