Linear Classification and Advanced Methods · Machine Learning

Support Vector Machines + Kernels

Watch lectures

Support Vector Machines + Kernels

1. Max-Margin Idea

Among separating hyperplanes, pick the one with largest gap to nearest points. Gap =2/∣∣w∣∣= 2 / ||w||. Support vectors are the points on the margin — they alone define ww.

min 12∣∣w∣∣2+C sum of hinge losses\text{min } \frac{1}{2} ||w||² + C \text{ sum of hinge losses}

CC trades margin width vs mistakes. Hinge: max(0,1−ys)max(0, 1 - y s).

2. Why Only Dots Matter

Optimal ww is a mix of training points, so predictions use dot products only:

f(x)=sum αiyi(xiTx)+bf(x) = \text{sum } α_{i} y_{i} (x_{i}^{T} x) + b

αi>0α_{i} > 0 only for support vectors (sparse).

3. Kernel Trick

Replace dot (aTb)(a^{T}b) with kernel K(a,b)K(a,b) = dot in richer space, without building that space:

Kernel K(a,b)K(a,b) Use
Linear aTba^{T}b text, high-dd
Polynomial (aTb+1)p(a^{T}b + 1)^{p} curves
RBF exp(−γ∣∣a−b∣∣2)exp(-γ ||a-b||²) smooth blobs (default)

RBF with small γγ → wide influence (smooth); large γγ → spiky (may overfit).

4. Practice

Standardize features, tune CC and γγ by CV. Linear first for d≫nd \gg n; RBF for nonlinear low-dd.

5. Exam Points

  • Margin objective + support vectors — 7 marks, very frequent.
  • Kernel trick + RBF form — 5 marks, very frequent.
  • CC and γγ roles — 3 marks, frequent.
Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.

← All Machine Learning modules