1. University MCA (AI/ML) Semester 2
  2. CAB212
  3. Unit 3

CAB212 · Unit 3: Classification

Support vector machines and kernels

8 practice questions

Key points

  • Maximum-margin hyperplane; width = 2/||w||
  • Support vectors define the boundary
  • Large C -> narrow margin, less tolerance
  • Kernels handle non-linear data

An SVM finds the hyperplane w.x + b = 0 that separates classes with the maximum margin. The margin width is 2 / ||w||, so maximising margin means minimising ||w||.

Worked example: w = (3, 4) has ||w|| = 5, so the margin width is 2/5 = 0.4.

Support vectors are the training points on the margin boundaries; only they determine the hyperplane.

  • Hard margin: no violations allowed; needs linearly separable data.
  • Soft margin: allows violations with penalty parameter C. Large C: fewer violations, narrower margin, risk of overfitting. Small C: wider margin, more tolerance.
  • Kernel trick: compute inner products in a high-dimensional space without constructing it. Common kernels: linear, polynomial, RBF (Gaussian). RBF has parameter gamma: large gamma gives very local, wiggly boundaries.

Features should be scaled. SVMs work well on medium-sized, high-dimensional data and scale poorly to very large n.

Exam pitfall: moving or removing a non-support-vector point does not change the solution.

Try two questions

Question 1 · Tier 2, Understand

The kernel trick lets an SVM:

  1. Avoid using class labels during training
  2. Skip feature scaling entirely
  3. Fit non-linear boundaries by implicit mapping to a higher-dimensional space
  4. Train a model without any data
Show the answer

C. Kernels compute inner products in feature space cheaply.

Question 2 · Tier 1, Recall

The points that lie closest to an SVM decision boundary and define it are called:

  1. Centroids
  2. Principal components
  3. Outliers only
  4. Support vectors
Show the answer

D. They sit on the margin.