dots                 package:kernlab                 R Documentation

_K_e_r_n_e_l _F_u_n_c_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     The kernel generating functions provided in kernlab. 
      The Gaussian RBF kernel k(x,x') = exp(-sigma |x - x'|^2) 
      The Polynomial kernel k(x,x') = (scale <x, x'> + offset)^{degree}
      The Linear kernel k(x,x') = <x, x'>
      The Hyperbolic tangent kernel k(x, x') = tanh(scale <x, x'> + 
     offset)
      The Laplacian kernel k(x,x') = exp(-sigma |x - x'|) 
      The Bessel kernel k(x,x') = (- Bessel_{(nu+1)}^n sigma |x -
     x'|^2) 
      The ANOVA RBF kernel k(x,x') = sum_{1<=q i_1 ... < i_D <=q N}
     prod_{d=1}^D k(x_{id}, {x'}_{id}) where k(x,x) is a Gaussian RBF
     kernel. 
      The Spline kernel  prod_{d=1}^D 1 + x_i x_j + x_i x_j min(x_i,
     x_j)  - frac{x_i + x_j}{2} min(x_i,x_j)^2 +
     frac{min(x_i,x_j)^3}{3} \ The String kernel.

_U_s_a_g_e:

     rbfdot(sigma = 1)

     polydot(degree = 1, scale = 1, offset = 1)

     tanhdot(scale = 1, offset = 1)

     vanilladot()

     laplacedot(sigma = 1)

     besseldot(sigma = 1, order = 1, degree = 1)

     anovadot(sigma = 1, degree = 1)

     splinedot()

     stringdot(length = 4, lambda = 0.5, type = "sequence", normalized = TRUE)

_A_r_g_u_m_e_n_t_s:

   sigma: The inverse kernel width used by the Gaussian the Laplacian,
          the Bessel and the ANOVA kernel 

  degree: The degree of the polynomial, bessel or ANOVA kernel
          function. This has to be an positive integer.

   scale: The scaling parameter of the polynomial and tangent kernel is
          a convenient way of normalizing patterns without the need to
          modify the data itself

  offset: The offset used in a polynomial or hyperbolic tangent kernel

   order: The order of the Bessel function to be used as a kernel

  length: The length of the substrings considered

  lambda: The decay factor

    type: Type of string kernel, currently 'sequence', 'string',
          'fullstring'

normalized: normalize string kernel values, (default: 'TRUE')

_D_e_t_a_i_l_s:

     The kernel generating functions are used to initialize a kernel
     function which calculates the dot (inner) product between two
     feature vectors in a Hilbert Space. These functions can be passed
     as a 'kernel' argument on almost all functions in kernlab (eg.
     'ksvm', 'kpca'  etc).

     Although using one of the existing kernel functions as a 'kernel'
     argument in various functions in kernlab has the advantage that
     optimized code is used to calculate various kernel expressions,
     any other function implementing a dot product of class 'kernel'
     can also be used as a kernel argument. This allows the user to
     use, test and develop special kernels for a given data set or
     algorithm.

_V_a_l_u_e:

     Return an S4 object of class 'kernel' which extents the 'function'
     class. The resulting function implements the given kernel
     calculating the inner (dot) product between two vectors. 

    kpar: a list containing the kernel parameters (hyperparameters)
          used.

     The kernel parameters can be accessed by the 'kpar' function.

_N_o_t_e:

     If the offset in the Polynomial kernel is set to $0$, we obtain
     homogeneous polynomial kernels, for positive values, we have
     inhomogeneous kernels. Note that for negative values the kernel
     does not satisfy Mercer's condition and thus the optimizers may
     fail. 

     In the Hyperbolic tangent kernel if the offset is negative the
     likelihood of obtaining a kernel matrix that is not positive
     definite is much higher (since then even some diagonal elements
     may be negative), hence if this kernel has to be used, the offset
     should always be positive. Note, however, that this is no
     guarantee that the kernel will be positive.

_A_u_t_h_o_r(_s):

     Alexandros Karatzoglou
      alexandros.karatzoglou@ci.tuwien.ac.at

_S_e_e _A_l_s_o:

     'kernelMatrix ', 'kernelMult', 'kernelPol'

_E_x_a_m_p_l_e_s:

     rbfkernel <- rbfdot(sigma = 0.1)
     rbfkernel

     kpar(rbfkernel)

     ## create two vectors
     x <- rnorm(10)
     y <- rnorm(10)

     ## calculate dot product
     rbfkernel(x,y)

