Description Usage Arguments Details Value Author(s) See Also Examples
kernelMatrix
calculates the kernel matrix K_{ij} = k(x_i,x_j) or K_{ij} =
k(x_i,y_j).
kernelPol
computes the quadratic kernel expression H = z_i z_j
k(x_i,x_j), H = z_i k_j k(x_i,y_j).
kernelMult
calculates the kernel expansion f(x_i) =
∑_{i=1}^m z_i k(x_i,x_j)
kernelFast
computes the kernel matrix, identical
to kernelMatrix
, except that it also requires the squared
norm of the first argument as additional input, useful in iterative
kernel matrix calculations.
1 2 3 4 5 6 7 8 9 10 11  ## S4 method for signature 'kernel'
kernelMatrix(kernel, x, y = NULL)
## S4 method for signature 'kernel'
kernelPol(kernel, x, y = NULL, z, k = NULL)
## S4 method for signature 'kernel'
kernelMult(kernel, x, y = NULL, z, blocksize = 256)
## S4 method for signature 'kernel'
kernelFast(kernel, x, y, a)

kernel 
the kernel function to be used to calculate the 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. 
z 
a suitable vector or matrix 
k 
a suitable vector or matrix 
a 
the squared norm of 
blocksize 
the kernel expansion computations are done block wise
to avoid storing the kernel matrix into memory. 
Common functions used during kernel based computations.
The kernel
parameter can be set to any function, of class
kernel, which computes the inner product in feature space between two
vector arguments. KERE provides the most popular kernel functions
which can be initialized by using the following
functions:
rbfdot
Radial Basis kernel function
polydot
Polynomial kernel function
vanilladot
Linear kernel function
tanhdot
Hyperbolic tangent kernel function
laplacedot
Laplacian kernel function
besseldot
Bessel kernel function
anovadot
ANOVA RBF kernel function
splinedot
the Spline kernel
(see example.)
kernelFast
is mainly used in situations where columns of the
kernel matrix are computed per invocation. In these cases,
evaluating the norm of each rowentry over and over again would
cause significant computational overhead.
kernelMatrix
returns a symmetric diagonal semidefinite matrix.
kernelPol
returns a matrix.
kernelMult
usually returns a onecolumn matrix.
Alexandros Karatzoglou
[email protected]
rbfdot
, polydot
,
tanhdot
, vanilladot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  ## use the spam data
x < matrix(rnorm(10*10),10,10)
## initialize kernel function
rbf < rbfdot(sigma = 0.05)
rbf
## calculate kernel matrix
kernelMatrix(rbf, x)
y < matrix(rnorm(10*1),10,1)
## calculate the quadratic kernel expression
kernelPol(rbf, x, ,y)
## calculate the kernel expansion
kernelMult(rbf, x, ,y)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.