0% found this document useful (0 votes)
34 views11 pages

Logistic Regression by Nirzona

Uploaded by

akter12345b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views11 pages

Logistic Regression by Nirzona

Uploaded by

akter12345b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

1

LOGISTIC REGRESSION

PRESENTED BY: JANNATUL FERDOUS NIRZONA


ROLL: 1829054
2
Outcomes:

 What is Logistic regression ?


 Logistic function-Sigmoid Function .
 Types of Logistic Regression.
 why use logistic Regression?
 How does Logistic Regression work?
 How to Evaluate Logistic Regression Model?

???
3
LOGISTIC REGRESSION

 Logistic regression is a supervised machine learning algorithm used for Binary


classification where we use sigmoid function, that takes input as independent
variables and produces a probability value between 0 and 1.
 Logistic regression predicts the output of a categorical dependent variable.
Therefore, the outcome must be a categorical or discrete value. It can be either Yes
or No, 0 or 1, true or False, etc. but instead of giving the exact value as 0 and 1, it
gives the probabilistic values which lie between 0 and 1.
Logistic function-Sigmoid 4
Function

 The sigmoid function is a mathematical function used


to map the predicted values to probabilities.
 It maps any real value into another value within a
range of 0 and 1. The value of the logistic regression
must be between 0 and 1, which cannot go beyond this
limit, so it forms a curve like the “S” form. The S-
form curve is called the Sigmoid function or the
logistic function.
5
Types of Logistic Regression

 On the basis of the categories, Logistic Regression can be classified into three types:
1. Binomial: In binomial Logistic regression, there can be only two possible types of the
dependent variables, such as 0 or 1, Pass or Fail, etc.
2. Multinomial: In multinomial Logistic regression, there can be 3 or more possible
unordered types of the dependent variable, such as “cat”, “dogs”, or “sheep”
3. Ordinal: In ordinal Logistic regression, there can be 3 or more possible ordered types
of dependent variables, such as “low”, “Medium”, or “High”.
6
why use logistic Regression

 Linear regression and logistic regression are machine learning techniques that make
predictions by analyzing historical data. Linear regression techniques
mathematically model the unknown factor on multiple known factors to estimate the
exact unknown value. Similarly, logistic regression uses mathematics to find the
relationships between two data factors. It then uses this relationship to predict the
value of one of those factors based on the other. The prediction usually has a finite
number of outcomes, like yes or no.
 Logistic regression models can help teams identify data anomalies, which are
predictive of fraud.
How does Logistic Regression 7
work?

The logistic regression model transforms the linear regression function continuous value
output into categorical value output using a sigmoid function, which maps any real-valued set
of independent variables input into a value between 0 and 1. This function is known as the
logistic function.
Let the independent input features be:
x11 ........ x1m
X= x21 ….. X2m
….. …… …….

xn1 ….. Xnm


8

0 IF CLASS 1
Y= 1 IF CLASS 2

and the dependent variable is Y having only binary value i.e. 0 or 1.


z= w⋅ X+ b
this can be represented w and b as the dot product of weight and bias respectively.
whatever we discussed above is the linear regression.
Now we use the sigmoid function where the input will be z and we find the probability
between 0 and 1. i.e. predicted y.
1
σ(z)= 1 + e-z
 σ(z) tends towards 1 as z→∞
 σ(z) tends towards 0 as z→−∞
9

 σ(z) is always bounded between 0 and 1

where the probability of being a class can be measured as:


P(y=1)=σ(z)
P(y=0)=1−σ(z)
the final logistic regression equation will be:
e w⋅
X+ b
p( X; b, w )=
1+ e
w⋅ X+ b
How to Evaluate Logistic 10
Regression Model?

 We can evaluate the logistic regression model using the following metrics:
 Confusion Matrix: This matrix shows the true positives, true negatives, false positives, and
false negatives. It helps in understanding the model's classification performance.
 Accuracy: The proportion of correctly classified instances out of the total instances. It’s a
common metric but can be misleading if the dataset is imbalanced.
 Precision: The ratio of true positives to the sum of true and false positives. It measures how
many predicted positives are actually positive.
 Recall (Sensitivity): The ratio of true positives to the sum of true positives and false negatives.
It measures how many actual positives the model captures.
 F1-Score: The harmonic mean of precision and recall, useful when you want a balance
between the two.
11

Thank You

You might also like