String kernel

From Dave's wiki
Jump to navigation Jump to search

In machine learning and data mining, a string kernel is a kernel function that operates on strings, i.e. finite sequences of symbols that need not be of the same length. String kernels can be intuitively understood as functions measuring the similarity of pairs of strings: the more similar two strings a and b are, the higher the value of a string kernel K(a, b) will be.

https://en.wikipedia.org/wiki/String_kernel

R

Use the kebabs package.

library(kebabs)
specK6 <- spectrumKernel(k = 6)
promSim <- getKernelMatrix(specK6, set_of_string)