Skip to content
Financial Machine Learning / Margin Methods and Kernels

The Kernel Trick: Feature Maps and Properties of Kernels

Every dual problem derived so far — hard-margin, soft-margin — depends on the training data only through the inner products ⟨x(i),x(j)⟩\langle x^{(i)},x^{(j)}\rangle. This note cashes in that structural fact: if a feature map ϕ\phi sends inputs into some richer (possibly much higher-, even infinite-dimensional) space, and if ϕ(x)⊤ϕ(z)\phi(x)^\top\phi(z) can be computed cheaply without ever forming ϕ(x)\phi(x) explicitly, then simply swapping ⟨x,z⟩\langle x,z\rangle for this kernel function K(x,z)K(x,z) upgrades the SVM (or any dot-product-only algorithm) to learn non-linear boundaries in the original input space, for free.

In this lesson

  1. Learning objectives
  2. Feature maps and the kernel function
  3. Kernels as similarity measures, and Mercer's theorem
  4. Common kernels
  5. The kernel trick, generically
  6. Worked example

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Financial Machine Learning syllabus.