stringdot | R Documentation |
String kernels.
stringdot(length = 4, lambda = 1.1, type = "spectrum", normalized = TRUE)
length |
The length of the substrings considered |
lambda |
The decay factor |
type |
Type of string kernel, currently the following kernels are
supported :
|
normalized |
normalize string kernel values, (default: |
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 or their function generating names
can be passed as a kernel
argument on almost all
functions in kernlab(e.g., ksvm
, kpca
etc.).
The string kernels calculate similarities between two strings
(e.g. texts or sequences) by matching the common substring
in the strings. Different types of string kernel exists and are
mainly distinguished by how the matching is performed i.e. some string
kernels count the exact matchings of n
characters (spectrum
kernel) between the strings, others allow gaps (mismatch kernel) etc.
Returns an S4 object of class stringkernel
which extents the
function
class. The resulting function implements the given
kernel calculating the inner (dot) product between two character vectors.
kpar |
a list containing the kernel parameters (hyperparameters) used. |
The kernel parameters can be accessed by the kpar
function.
The spectrum
and boundrange
kernel are faster and
more efficient implementations of the string
and
fullstring
kernels
which will be still included in kernlab
for the next two versions.
Alexandros Karatzoglou
alexandros.karatzoglou@ci.tuwien.ac.at
dots
, kernelMatrix
, kernelMult
, kernelPol
sk <- stringdot(type="string", length=5)
sk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.