SVM's dual optimization and prediction only depend on sample inner products
xiTxj. The kernel trick computes inner products in a high- (even infinite-) dimensional feature space directly via
K(x,z)=⟨ϕ(x),ϕ(z)⟩ without ever constructing
ϕ — as long as
K is a Mercer kernel (symmetric PSD). Common kernels: linear
K=xTz, polynomial
K=(xTz+c)d, and the RBF Gaussian kernel
K(x,z)=exp(−γ∥x−z∥2) with bandwidth
γ=2σ21: larger
γ gives more complex boundaries (overfitting), smaller gives smoother ones (underfitting). The kernelized decision function is
f(x)=∑i∈SVαiyiK(xi,x)+b at
O(nSV⋅d) cost, independent of the feature-map dimension.