IGNOU CORNER

Q14: For the given points of two classes red and blue:Blue: { (1,2), (2,1), (1,-1), (1,-2)}Red : { (3,1), (4,3), (3,5), (6,3)}Plot a graph for the red and blue categories. Find the support vectors and optimal separating line.

Q14: For the given points of two classes red and blue:
Blue: { (1,2), (2,1), (1,-1), (1,-2)}
Red : { (3,1), (4,3), (3,5), (6,3)}
Plot a graph for the red and blue categories. Find the support vectors and optimal
separating line.

Given
Blue class B={(1,2),(2,1),(1,−1),(1,−2)}B = \{(1,2), (2,1), (1,-1), (1,-2)\}B={(1,2),(2,1),(1,−1),(1,−2)}
Red class R={(3,1),(4,3),(3,5),(6,3)}R = \{(3,1), (4,3), (3,5), (6,3)\}R={(3,1),(4,3),(3,5),(6,3)}


1) Plot (description)

If we plot the points on the (x1,x2)(x_1,x_2)(x1​,x2​)-plane:

This clear left–right separation suggests a vertical separating line.

(An illustrative graph with classes, the optimal line, and margins is provided above: boundary at x1=2.5x_1=2.5×1​=2.5, margins at x1=2x_1=2×1​=2 and x1=3x_1=3×1​=3.)


2) Linear separability and margin geometry

Because the nearest opposing points in the horizontal direction sit at x1=2x_1=2×1​=2 (blue) and x1=3x_1=3×1​=3 (red), the maximum-margin hyperplane in R2\mathbb{R}^2R2 is the vertical line exactly halfway between them:  x1=2.5 \boxed{\,x_1 = 2.5\,}x1​=2.5​

The two margin lines (distance 1/21/21/2 on either side of the boundary) are:  x1=2andx1=3 \boxed{\,x_1 = 2 \quad \text{and} \quad x_1 = 3\,}x1​=2andx1​=3​


3) Support vectors

Support vectors are the training points that lie exactly on the margin lines:

These three points touch the margin lines and determine the maximum-margin separator.


4) Optimal separating line (SVM form)

A convenient parameterization of the optimal hyperplane is: w=(2, 0),b=−5\mathbf{w} = (2,\,0), \qquad b = -5w=(2,0),b=−5

The decision function is: f(x)  =  w⋅x+b  =  2×1−5f(\mathbf{x}) \;=\; \mathbf{w}\cdot \mathbf{x} + b \;=\; 2x_1 – 5f(x)=w⋅x+b=2×1​−5


5) Margin width

Under the standard hard-margin SVM constraints yi(w⋅xi+b)≥1y_i(\mathbf{w}\cdot \mathbf{x}_i+b)\ge 1yi​(w⋅xi​+b)≥1, the geometric margin on each side is: γ  =  1∥w∥  =  122+02  =  12  =  0.5\gamma \;=\; \frac{1}{\lVert \mathbf{w}\rVert} \;=\; \frac{1}{\sqrt{2^2+0^2}} \;=\; \frac{1}{2} \;=\; 0.5γ=∥w∥1​=22+02​1​=21​=0.5

Hence the total margin width (distance between the two margin lines) is: 2γ=1\boxed{2\gamma = 1}2γ=1​

which matches the horizontal gap between x1=2x_1=2×1​=2 and x1=3x_1=3×1​=3.


Final Answer (concise)

Exit mobile version