SlideShare a Scribd company logo
2
Most read
9
Most read
10
Most read
LOGISTIC
REGRESSION
INTRODUCTION
Supervised Learning is that Learning where data is labeled and the
motivation is to classify something or predict a value. Example:
Detecting fraudulent transactions from a list of credit card
transactions.
There are two types of supervised learning:
1.Classification model - In simple terms, a classification
model predicts possible outcomes. Example: Predicting if
a transaction is fraud or not.
2.Regression model - Are used to predict a numerical
value. Example: Predicting the sale price of a house.
INTRODUCTION TO CLASSIFICATION
Classification is the process of finding or discovering a model or function
which helps in separating the data into multiple categorical classes i.e.
discrete values. In classification, data is categorized under different labels
according to some parameters given in input and then the labels are
predicted for the data.
The derived mapping function could be demonstrated in the
form of “IF-THEN” rules. The classification process deal with
the problems where the data can be divided into binary or
multiple discrete labels.
Let’s take an example, suppose we want to predict the
possibility of the winning of a match by Team A on the basis
of some parameters recorded earlier. Then there would be
two labels Yes and No.
INTRODUCTION TO REGRESSION
Regression is a statistical method which allow us to predict a
dependent output variable based on the values of independent
input variables.
•Dependent Variable: This is the variable
that we are trying to understand or
forecast or predict.
•Independent Variable: These are factors
that influence the analysis or target
variable and provide us with information
regarding the relationship of the variables
with the target variable.
Logistic Regression in machine learning.docx
LINEAR REGRESSION
It is a machine learning model based on supervised learning
that is used to predict the values of output variables based
on the value of input variables.
It aims to find the
relationship between input
and output variables by
plotting a line which best
fits the data given to it.
The equation which can be used to fit a line is the equation of
straight line. The equation gives the output variable based on
the input variable and inclination of the line.
Logistic Regression in machine learning.docx
LOGISTIC REGRESSION
Logistic regression is a classification algorithm which is used to predict the
category of a dependent variable based on the values of independent
variables. Its output is 0 or 1. It is extensively used in predictive modeling,
where the model estimates the mathematical probability of whether an
instance belongs to a specific category or not.
For example, 0 – represents
a negative class; 1 –
represents a positive class.
Logistic regression is
commonly used in binary
classification problems
where the outcome variable
reveals either of the two
categories (0 and 1).
A threshold is set which will be used to classify value into
the two categories. Values of Y above this threshold will be
classified as category 1 and values below the threshold will
be taken as category 0.
Some examples of such classifications and instances where the
binary response is expected or implied are:
1. Determine the probability of heart attacks: With the help of a logistic
model, medical practitioners can determine the relationship between variables
such as the weight, exercise, etc., of an individual and use it to predict whether
the person will suffer from a heart attack or any other medical complication.
2. Possibility of enrolling into a university: Application aggregators can
determine the probability of a student getting accepted to a particular university
or a degree course in a college by studying the relationship between the
estimator variables, such as GRE, GMAT, or TOEFL scores..
3. Identifying spam emails: Email inboxes are filtered to determine if the
email communication is promotional/spam by understanding the predictor
variables and applying a logistic regression algorithm to check its authenticity.
LOGISTIC REGRESSION EQUATION
The given equation is used to represent a sigmoid function.
Sigmoid is a mathematical function that takes any real
number and maps it to a probability between 0 and 1.
Some Key components to remember:
• Logistic Regression Model:
Z = log (p / 1− p) =β0 +β1X1+β2X2…βkXk
• Probability of Event is therefore estimated from logit
(‘model score’) by the following transformation:
EXAMPLE OF LOGISTIC REGRESSION
Logistic regression is a regression technique where the dependent variable is
categorical. Let us look at an example, where we are trying to predict whether it is
going to rain or not, based on the independent variables: temperature and
humidity.
Here, the question is how we find out whether it is
going to rain or not. Let us take a step back and
try to remember what used to happen in linear
regression. We fitted a straight line based on the
relationship between the dependent and
independent variables. But in logistic regression,
the dependent variable is categorical, and
hence it can have only two values, either 0 or 1.
In the logistic regression model, depending upon
the attributes, we get a probability of ‘yes’ or ‘no’.
So, we get an S-shaped curve out of this model.
Logistic Regression in machine learning.docx
One very common way of assessing the model is the confusion matrix. What
does this confusion matrix do? Well, the confusion matrix would show the
number of correct and incorrect predictions made by a classification
model compared to the actual outcomes from the data.
Confusion matrix gives a matrix output as shown above.
Now, let’s see what TP, FP, FN, and TN are.
•TP or True Positive value defines the number of positive
classes predicted correctly as a positive class.
•FP or False Positive value defines the number of negative
classes predicted incorrectly as a positive class.
•FN or False Negative value defines the number of
positive classes predicted incorrectly as a negative class.
•TN or True Negative value defines the number of
negative classes predicted correctly as a negative class.
Key Advantages
Key Assumptions for implementing it
TYPES OF LOGISTIC REGRESSION
Logistic Regression in machine learning.docx
Logistic Regression in machine learning.docx
Logistic Regression in machine learning.docx

More Related Content

PPTX
Logistic Regression.pptx
PDF
Logistic regression sage
PPTX
Logistical Regression.pptx
PPTX
Supervised Machine Learning Algorithms
PDF
Machine Learning-Lec5.pdf_explain of logistic regression
PDF
Supervised Learning.pdf
PPTX
MACHINE LEARNING Unit -2 Algorithm.pptx
PDF
Multinomial Logistic Regression.pdf
Logistic Regression.pptx
Logistic regression sage
Logistical Regression.pptx
Supervised Machine Learning Algorithms
Machine Learning-Lec5.pdf_explain of logistic regression
Supervised Learning.pdf
MACHINE LEARNING Unit -2 Algorithm.pptx
Multinomial Logistic Regression.pdf

Similar to Logistic Regression in machine learning.docx (20)

PPTX
Linear regression aims to find the "best-fit" linear line
PPTX
Logistic Regression power point presentation.pptx
PPTX
24AI201_AI_Unit_4 (1).pptx Artificial intelligence
PPTX
Logistic Regression in machine learning ppt
PPTX
Machine Learning (Classification Models)
PPTX
CHAPTER 11 LOGISTIC REGRESSION.pptx
PDF
Logistic regression
PDF
Classification Techniques for Machine Learning
DOCX
The future is uncertain. Some events do have a very small probabil.docx
PPTX
Chapter III.pptx
PDF
Machine learning Mind Map
PPTX
Applications of regression analysis - Measurement of validity of relationship
PDF
2018 p 2019-ee-a2
PDF
ML_Lec4 introduction to linear regression.pdf
PPTX
Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
PPTX
basics of Logistic-regression power point presentation
PDF
working with python
PDF
Linear regression model in econometrics undergraduate
PPTX
logistic regression significance checking
PPTX
Logistic-regression.pptx
Linear regression aims to find the "best-fit" linear line
Logistic Regression power point presentation.pptx
24AI201_AI_Unit_4 (1).pptx Artificial intelligence
Logistic Regression in machine learning ppt
Machine Learning (Classification Models)
CHAPTER 11 LOGISTIC REGRESSION.pptx
Logistic regression
Classification Techniques for Machine Learning
The future is uncertain. Some events do have a very small probabil.docx
Chapter III.pptx
Machine learning Mind Map
Applications of regression analysis - Measurement of validity of relationship
2018 p 2019-ee-a2
ML_Lec4 introduction to linear regression.pdf
Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
basics of Logistic-regression power point presentation
working with python
Linear regression model in econometrics undergraduate
logistic regression significance checking
Logistic-regression.pptx
Ad

Recently uploaded (20)

PDF
Transcultural that can help you someday.
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PDF
Introduction to Data Science and Data Analysis
PPTX
Database Infoormation System (DBIS).pptx
PDF
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PDF
Lecture1 pattern recognition............
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PDF
[EN] Industrial Machine Downtime Prediction
PDF
Optimise Shopper Experiences with a Strong Data Estate.pdf
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PPT
Predictive modeling basics in data cleaning process
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
IB Computer Science - Internal Assessment.pptx
Transcultural that can help you someday.
oil_refinery_comprehensive_20250804084928 (1).pptx
Introduction to Data Science and Data Analysis
Database Infoormation System (DBIS).pptx
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
STUDY DESIGN details- Lt Col Maksud (21).pptx
Lecture1 pattern recognition............
IBA_Chapter_11_Slides_Final_Accessible.pptx
Miokarditis (Inflamasi pada Otot Jantung)
[EN] Industrial Machine Downtime Prediction
Optimise Shopper Experiences with a Strong Data Estate.pdf
Introduction-to-Cloud-ComputingFinal.pptx
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Predictive modeling basics in data cleaning process
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
ISS -ESG Data flows What is ESG and HowHow
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Qualitative Qantitative and Mixed Methods.pptx
.pdf is not working space design for the following data for the following dat...
IB Computer Science - Internal Assessment.pptx
Ad

Logistic Regression in machine learning.docx

  • 2. INTRODUCTION Supervised Learning is that Learning where data is labeled and the motivation is to classify something or predict a value. Example: Detecting fraudulent transactions from a list of credit card transactions. There are two types of supervised learning: 1.Classification model - In simple terms, a classification model predicts possible outcomes. Example: Predicting if a transaction is fraud or not. 2.Regression model - Are used to predict a numerical value. Example: Predicting the sale price of a house.
  • 3. INTRODUCTION TO CLASSIFICATION Classification is the process of finding or discovering a model or function which helps in separating the data into multiple categorical classes i.e. discrete values. In classification, data is categorized under different labels according to some parameters given in input and then the labels are predicted for the data. The derived mapping function could be demonstrated in the form of “IF-THEN” rules. The classification process deal with the problems where the data can be divided into binary or multiple discrete labels. Let’s take an example, suppose we want to predict the possibility of the winning of a match by Team A on the basis of some parameters recorded earlier. Then there would be two labels Yes and No.
  • 4. INTRODUCTION TO REGRESSION Regression is a statistical method which allow us to predict a dependent output variable based on the values of independent input variables. •Dependent Variable: This is the variable that we are trying to understand or forecast or predict. •Independent Variable: These are factors that influence the analysis or target variable and provide us with information regarding the relationship of the variables with the target variable.
  • 6. LINEAR REGRESSION It is a machine learning model based on supervised learning that is used to predict the values of output variables based on the value of input variables. It aims to find the relationship between input and output variables by plotting a line which best fits the data given to it.
  • 7. The equation which can be used to fit a line is the equation of straight line. The equation gives the output variable based on the input variable and inclination of the line.
  • 9. LOGISTIC REGRESSION Logistic regression is a classification algorithm which is used to predict the category of a dependent variable based on the values of independent variables. Its output is 0 or 1. It is extensively used in predictive modeling, where the model estimates the mathematical probability of whether an instance belongs to a specific category or not.
  • 10. For example, 0 – represents a negative class; 1 – represents a positive class. Logistic regression is commonly used in binary classification problems where the outcome variable reveals either of the two categories (0 and 1). A threshold is set which will be used to classify value into the two categories. Values of Y above this threshold will be classified as category 1 and values below the threshold will be taken as category 0.
  • 11. Some examples of such classifications and instances where the binary response is expected or implied are: 1. Determine the probability of heart attacks: With the help of a logistic model, medical practitioners can determine the relationship between variables such as the weight, exercise, etc., of an individual and use it to predict whether the person will suffer from a heart attack or any other medical complication. 2. Possibility of enrolling into a university: Application aggregators can determine the probability of a student getting accepted to a particular university or a degree course in a college by studying the relationship between the estimator variables, such as GRE, GMAT, or TOEFL scores.. 3. Identifying spam emails: Email inboxes are filtered to determine if the email communication is promotional/spam by understanding the predictor variables and applying a logistic regression algorithm to check its authenticity.
  • 13. The given equation is used to represent a sigmoid function. Sigmoid is a mathematical function that takes any real number and maps it to a probability between 0 and 1.
  • 14. Some Key components to remember: • Logistic Regression Model: Z = log (p / 1− p) =β0 +β1X1+β2X2…βkXk • Probability of Event is therefore estimated from logit (‘model score’) by the following transformation:
  • 15. EXAMPLE OF LOGISTIC REGRESSION Logistic regression is a regression technique where the dependent variable is categorical. Let us look at an example, where we are trying to predict whether it is going to rain or not, based on the independent variables: temperature and humidity. Here, the question is how we find out whether it is going to rain or not. Let us take a step back and try to remember what used to happen in linear regression. We fitted a straight line based on the relationship between the dependent and independent variables. But in logistic regression, the dependent variable is categorical, and hence it can have only two values, either 0 or 1. In the logistic regression model, depending upon the attributes, we get a probability of ‘yes’ or ‘no’. So, we get an S-shaped curve out of this model.
  • 17. One very common way of assessing the model is the confusion matrix. What does this confusion matrix do? Well, the confusion matrix would show the number of correct and incorrect predictions made by a classification model compared to the actual outcomes from the data.
  • 18. Confusion matrix gives a matrix output as shown above. Now, let’s see what TP, FP, FN, and TN are. •TP or True Positive value defines the number of positive classes predicted correctly as a positive class. •FP or False Positive value defines the number of negative classes predicted incorrectly as a positive class. •FN or False Negative value defines the number of positive classes predicted incorrectly as a negative class. •TN or True Negative value defines the number of negative classes predicted correctly as a negative class.
  • 20. Key Assumptions for implementing it
  • 21. TYPES OF LOGISTIC REGRESSION