A string kernel is a function from any of various families of kernel functions (see kernel methods) that operate over strings and sequences. The most typical example is as follows. Suppose that we are dealing with strings over a finite alphabet Σ. Given a string a = a1a2… a n ∈ Σ∗, we say that a substring p = p1p2… p k occurs in a on positions i1i2… i k iff 1 ≤ i1 < i2 < … < i k ≤ n and a ij = p j for all j = 1, …, k. We define the weight of this occurrence as \(\lambda^{i_k-i_i-k+1}\), where λ ∈ [0, 1] is a constant chosen in advance; in other words, an occurrence weighs less if characters of p are separated by other characters. Let ϕ p (a) be the sum of the weights of all occurrences of p in a, and let ϕ(a) = (ϕ p (a))p ∈ ∑∗ be an infinite-dimensional feature vector consisting of ϕ p (a) for all possible substrings p ∈ Σ*. It turns out that the dot product of two such infinite-length vectors, K(a, a′) = ϕ(a)Tϕ(a′), can be computed in time polynomial in the length of a and a′, e.g.,...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer Science+Business Media New York
About this entry
Cite this entry
(2017). String Kernel. In: Sammut, C., Webb, G.I. (eds) Encyclopedia of Machine Learning and Data Mining. Springer, Boston, MA. https://doi.org/10.1007/978-1-4899-7687-1_790
Download citation
DOI: https://doi.org/10.1007/978-1-4899-7687-1_790
Published:
Publisher Name: Springer, Boston, MA
Print ISBN: 978-1-4899-7685-7
Online ISBN: 978-1-4899-7687-1
eBook Packages: Computer ScienceReference Module Computer Science and Engineering