Back to the 2025 paper

Unit 3: Classification & Regression

20257m

Explain the concept of linear classifiers. How do they separate classes in feature space? Give examples of linearly separable and non-separable datasets.

Worked SolutionAI Assisted

Linear Classifiers:

Classifier where decision boundary is linear function wTx+b=0\mathbf{w}^T\mathbf{x}+b=0. Prediction: y^=sign(wTx+b)\hat y = sign(\mathbf{w}^T\mathbf{x}+b) (binary), or softmaxsoftmax for multi-class. Hypothesis space: half-spaces.

How they separate in feature space:

  • In Rd\mathbb{R}^d, hyperplane splits space into two half-spaces. Distance from point to hyperplane =∣wTx+b∣/∣∣w∣∣=|w^T x+b|/||w||.
  • Learning finds w,bw,b minimizing loss (perceptron, logistic, SVM hinge). Geometrically, orientation and offset adjusted to separate classes.
  • For d=2d=2, boundary is line; d=3d=3 plane; higher dd hyperplane.
  • Margin intuition (SVM): maximize distance between boundary and nearest points.

Linearly Separable example:
AND gate data: (0,0)→0,(0,1)→0,(1,0)→0,(1,1)→1(0,0)\to0, (0,1)\to0,(1,0)\to0,(1,1)\to1 can be separated by x1+x2−1.5=0x_1+x_2-1.5=0. Points on opposite sides perfectly separable. Iris dataset (setosa vs versicolor with sepal length/width) approx linear.

Non-separable example:
XOR: (0,0)→0,(1,0)→1,(0,1)→1,(1,1)→0(0,0)\to0,(1,0)\to1,(0,1)\to1,(1,1)\to0 — no single line separates. Need non-linear boundary. Concentric circles, interleaving moons. Solution: map to higher dim via features ϕ(x)=(x1,x2,x1x2)\phi(x)=(x_1,x_2,x_1x_2) or use kernel/nonlinear model (MLP with hidden layer).

Limitation: Linear classifiers cannot capture XOR, curved boundaries without feature engineering/kernel trick. Advantage: simple, fast, interpretable, works when data approx linear or high-dim sparse (text).

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.