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.
AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.

← All Machine Learning modules