Linear Classification and Advanced Methods · Machine Learning

Linear Classification

Watch lectures

Linear Classification

1. Setup

Map x→y∈0,1x → y ∈ \\{0,1\\} via linear score + threshold:

s=wTx+bypred=1 if s≥0 else 0s = w^{T} x + b \quad \quad y_{pred} = 1 \text{ if } s ≥ 0 \text{ else } 0

Decision boundary wTx+b=0w^{T}x+b=0 is a hyperplane. Data is linearly separable if some hyperplane splits classes perfectly.

2. Loss Problem

0-1 loss is non-convex (NP-hard to optimize). Use surrogates: logistic loss, hinge (SVM), perceptron loss.

3. Three Linear Classifiers (preview)

Model Loss Output
Perceptron max(0,−ys)(0, -y s) hard label
Logistic log(1+exp(−ys))log(1+exp(-y s)) probability
SVM max(0,1−ys)(0, 1-y s) + λ∣∣w∣∣2λ||w||² max-margin label

4. Geometry

w is normal to boundary; ||w|| controls margin width
b shifts boundary; scaling w,b together changes loss but not boundary

5. Exam Points

  • Define score + hyperplane — 3-5 marks, very frequent.
  • Why surrogate loss needed — 3 marks, frequent.
  • Separable vs non-separable sketch — 2 marks.
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.

← All Machine Learning modules