Girish Mahajan (Editor)

Radial basis function kernel

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In machine learning, the (Gaussian) 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.

The RBF kernel on two samples x and x', represented as feature vectors in some input space, is defined as

K ( x , x ) = exp ( x x 2 2 σ 2 )

x x 2 may be recognized as the squared Euclidean distance between the two feature vectors. σ is a free parameter. An equivalent, but simpler, definition involves a parameter γ = 1 2 σ 2 :

K ( x , x ) = exp ( γ x x 2 )

Since the value of the RBF kernel decreases with distance and ranges between zero (in the limit) and one (when x = x'), it has a ready interpretation as a similarity measure. The feature space of the kernel has an infinite number of dimensions; for σ = 1 , its expansion is:

exp ( 1 2 x x 2 ) = j = 0 ( x x ) j j ! exp ( 1 2 x 2 ) exp ( 1 2 x 2 ) = j = 0 n i = j exp ( 1 2 x 2 ) x 1 n 1 x k n k n 1 ! n k ! exp ( 1 2 x 2 ) x 1 n 1 x k n k n 1 ! n k !

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. Typically, these take the form of a function z that maps a single vector to a vector of higher dimensionality, approximating the kernel:

z ( x ) z ( x ) φ ( x ) φ ( x ) = K ( x , x )

where φ is the implicit mapping embedded in the RBF kernel.

One way to construct such a z is to randomly sample from the Fourier transformation of the kernel. 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.

References

Radial basis function kernel Wikipedia