stringdot(length = 4, lambda = 1.1, type = "spectrum", normalized = TRUE)spectrum the kernel considers only matching substring of
exactly length $n$ (also know as string kernel). Each such matching
substring is given a constant weiTRUE)stringkernel which extents the
function class. The resulting function implements the given
kernel calculating the inner (dot) product between two character vectors.kpar function.kernel argument on almost all
functions in 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.
dots, kernelMatrix, kernelMult, kernelPolsk <- stringdot(type="string", length=5)
skRun the code above in your browser using DataLab