The RBF kernel maps data into infinite dimensions

TIL that the RBF kernel K(x,y)=eβˆ’Ξ³||xβˆ’y||2 implicitly map data into an infinite-dimensional space. The explanation is based on the Taylor series expansion of the kernel, where each term in the expansion corresponds to a constant + linear + quadratic + cubic etc set of dimensions in an infinite-dimensional feature space. This new infinite-dimensional space has the property that points that were close together in the original space are still close in the new space, and vice versa for points that were far in the original space.

This sounds impossible, but you can avoid explicitly computing these transformations with the kernel trick. The neat thing is that applying the kernel function K(x,y) to your original data is equivalent to expanding your data into the infinite-dimensional space before computing the dot product: K(x,y)=βŸ¨Ο•(x),Ο•(y)⟩. So, you get the benefits of working in a high-dimensional space without paying the compute and memory cost.

Copyright Ricardo Decal. richarddecal.com