Math Behind Linear Classification

Discriminant Classifier

Sarvesh Khetan
2 min readMay 17, 2024

Table of Contents :

1.Motivation
2. Solution
2.a. Simple Linear Classification
2.b.
Multiple Linear Classification
3. Code Implementation

Motivation

We already know how to solve a regression problem statement using linear regression. So the idea here is to apply the same intuition for a classification problem statement !!

Simple Linear Classification

For better understanding let’s first build the intuition using just 2 feature datasets so that we can visualize concepts.

Now based on the above logic we will have to devise a cost function

Stochastic Gradient Descent Error Plot

Now at the time of inference, you just need to substitute the point in the line equation to classify it

Multiple Linear Classification

Now you can just extrapolate above intuition to N feature dataset.

--

--

Sarvesh Khetan
Sarvesh Khetan

Written by Sarvesh Khetan

A deep learning enthusiast and a Masters Student at University of Maryland, College Park.

No responses yet