Logistic Regression
Logistic Regression
Swakkhar Shatabda
BRAC University
December 2, 2024
Contents
1 Classification
2 Sigmoid
3 Cross Entropy
Classification
Data
Experiments
We will first try to predict the class of the dataset based on two features,
x1 and x2 .
Experiments
We will first try to predict the class of the dataset based on two features,
x1 and x2 .
Logistic Regression
y = w0 + w1 x1
Linear Classification
This linear classifier divides instances based on the local wrt the line,
on the right positive, negative on the left
Any point on the line satisfies the equation. Any point on the right
(3,1) yields positive result and any point on the left (1,1) yields
negative result.
Based on this we can define a linear classifier
Swakkhar Shatabda CSE 422: Fall 2021 December 2, 2024 9 / 19
Classification Sigmoid Cross Entropy Stochastic Gradient Descent
Linear Classification
f (~x ) = w0 + w1 x1 + w2 x2 + · · · + wn xn
LinearClassifier
This simple classifier just checks whether a point is on the left or right.
A step function!
A sigmoid function!
1
σ(~x ) = 1+exp(−~
x)
How it works?
m
X
e= (−y (i)log (ŷ (i)) − (1 − y )log (1 − ŷ ))
i=1
In a similar way,
m
δe X
= (ŷ (i) − y (i)).xi (2)
δwi i=1
Thats it!
Thank you