Kernel trick

Also: kernel methods, kernel function, RBF kernel

Algorithms that only use dot products between examples, such as SVMs, can swap xᵢ·xⱼ for a kernel K(xᵢ, xⱼ) = φ(xᵢ)·φ(xⱼ). This acts like a linear model on the mapped features φ(x) at the cost of evaluating K.

K(x, z) = φ(x)·φ(z), e.g. RBF: K(x, z) = exp(−γ ‖x − z‖²)

Example

On a number line, class A sits at |x| < 1 and class B outside it; no single threshold separates them, but mapping x → (x, x²) makes them separable by the line x² = 1.

See it in the lesson: Support Vector Machines →

Related terms

More in Classical ML