GATE DA 2025 · Support Vector Machine (SVM)

MSQ · 2 marks · Problem ML-SVM-0008

Consider designing a linear binary classifier \(y = \text{sign}(\mathbf{w}^T\mathbf{x} + b)\) on a training dataset with class labels \(y_i \in \{+1, -1\}\). The positive class (\(y_i = +1\)) consists of three points: \(\{(2,0)^T, (0,2)^T, (2,2)^T\}\), and the negative class (\(y_i = -1\)) consists of a single point: \(\{(0,0)^T\}\). A hard-margin linear Support Vector Machine (SVM) is trained on this dataset. The geometric margin is the distance from the separating hyperplane to the nearest training point. Which of the following statements is/are correct?
  1. A
    The optimal separating hyperplane is \(x_1 + x_2 - 1 = 0\).
  2. B
    The support vectors are \((2,0)^T\), \((0,2)^T\), and \((0,0)^T\).
  3. C
    The geometric margin of the SVM is \(\dfrac{1}{\sqrt{2}}\).
  4. D
    The geometric margin of the SVM is \(\sqrt{2}\).

Solve it on GATE DA practice →More Supervised Learning — Classification problems

Show the worked solution\[\boxed{\min\tfrac12\lVert\mathbf w\rVert^2\ \text{ s.t. } y_i(\mathbf w^{\top}\mathbf x_i+b)\ge1,\qquad \text{margin}=\frac{1}{\lVert\mathbf w\rVert}}\]The positive hull is the triangle \((2,0),(0,2),(2,2)\); its closest part to \((0,0)\) is the edge \(x_1+x_2=2\), at distance \(\sqrt2\). The optimal hyperplane is parallel to it, halfway: \(x_1+x_2=1\), i.e. \(\mathbf w=(1,1)\), \(b=-1\).KKT check: \((0,0)\), \((2,0)\), \((0,2)\) satisfy \(y_i(\mathbf w^{\top}\mathbf x_i+b)=1\), \((2,2)\) gives \(3\); with \(\alpha=\tfrac12,\tfrac12\) for \((2,0),(0,2)\) and \(\alpha=1\) for \((0,0)\), \(\sum\alpha_iy_i\mathbf x_i=(1,1)=\mathbf w\) and \(\sum\alpha_iy_i=0\).(A) Correct — the hyperplane is \(x_1+x_2-1=0\).(B) Correct — the points on the margin lines \(x_1+x_2=0\) and \(x_1+x_2=2\) are \((0,0)\), \((2,0)\), \((0,2)\).(C) Correct — \(\dfrac{1}{\lVert\mathbf w\rVert}=\dfrac{|0+0-1|}{\sqrt2}=\dfrac{1}{\sqrt2}\).(D) Incorrect — \(\sqrt2=2/\lVert\mathbf w\rVert\) is the full width between the two margin lines, not the distance to the nearest point.Answer: A, B, C

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com