Radial basis function kernel

From testwiki
Jump to navigation Jump to search

Template:Short description In machine learning, the radial basis function kernel, or RBF kernel, is a popular kernel function used in various kernelized learning algorithms. In particular, it is commonly used in support vector machine classification.[1]

The RBF kernel on two samples π±βˆˆβ„k and 𝐱, represented as feature vectors in some input space, is defined as[2]

K(𝐱,𝐱)=exp(βˆ’β€–π±βˆ’π±β€–22Οƒ2)

β€–π±βˆ’π±β€–2 may be recognized as the squared Euclidean distance between the two feature vectors. Οƒ is a free parameter. An equivalent definition involves a parameter Ξ³=12Οƒ2:

K(𝐱,𝐱)=exp(βˆ’Ξ³β€–π±βˆ’π±β€–2)

Since the value of the RBF kernel decreases with distance and ranges between zero (in the infinite-distance limit) and one (when Template:Math), it has a ready interpretation as a similarity measure.[2] The feature space of the kernel has an infinite number of dimensions; for Οƒ=1, its expansion using the multinomial theorem is:[3]

exp(βˆ’12β€–π±βˆ’π±β€–2)=exp(22π±βŠ€π±βˆ’12‖𝐱‖2βˆ’12‖𝐱‖2)=exp(𝐱⊀𝐱)exp(βˆ’12‖𝐱‖2)exp(βˆ’12‖𝐱‖2)=βˆ‘j=0∞(𝐱⊀𝐱)jj!exp(βˆ’12‖𝐱‖2)exp(βˆ’12‖𝐱‖2)=βˆ‘j=0βˆžβˆ‘n1+n2++nk=jexp(βˆ’12‖𝐱‖2)x1n1β‹―xknkn1!β‹―nk!exp(βˆ’12‖𝐱‖2)x1n1β‹―xknkn1!β‹―nk!=βŸ¨Ο†(𝐱),Ο†(𝐱)⟩
Ο†(𝐱)=exp(βˆ’12‖𝐱‖2)(aβ„“0(0),a1(1),,aβ„“1(1),,a1(j),,aβ„“j(j),)

where β„“j=(k+jβˆ’1j),

aβ„“(j)=x1n1β‹―xknkn1!β‹―nk!|n1+n2++nk=j∧1≀ℓ≀ℓj

Approximations

Because support vector machines and other models employing the kernel trick do not scale well to large numbers of training samples or large numbers of features in the input space, several approximations to the RBF kernel (and similar kernels) have been introduced.[4] Typically, these take the form of a function z that maps a single vector to a vector of higher dimensionality, approximating the kernel:

⟨z(𝐱),z(𝐱)βŸ©β‰ˆβŸ¨Ο†(𝐱),Ο†(𝐱)⟩=K(𝐱,𝐱)

where Ο† is the implicit mapping embedded in the RBF kernel.

Fourier random features

Template:Main


One way to construct such a z is to randomly sample from the Fourier transformation of the kernel[5]Ο†(x)=1D[cos⟨w1,x⟩,sin⟨w1,x⟩,…,cos⟨wD,x⟩,sin⟨wD,x⟩]Twhere w1,...,wD are independent samples from the normal distribution N(0,Οƒβˆ’2I).

Theorem: E[βŸ¨Ο†(x),Ο†(y)⟩]=eβ€–xβˆ’yβ€–2/(2Οƒ2).

Proof: It suffices to prove the case of D=1. Use the trigonometric identity cos(aβˆ’b)=cos(a)cos(b)+sin(a)sin(b), the spherical symmetry of gaussian distribution, then evaluate the integral

βˆ«βˆ’βˆžβˆžcos(kx)eβˆ’x2/22Ο€dx=eβˆ’k2/2.

Theorem: Var[βŸ¨Ο†(x),Ο†(y)⟩]=O(Dβˆ’1). (Appendix A.2[6]).

NystrΓΆm method

Another approach uses the NystrΓΆm method to approximate the eigendecomposition of the Gram matrix K, using only a random sample of the training set.[7]

See also

References

Template:Reflist