SlideShare a Scribd company logo
www.edureka.co/pythonData Science Certification Training
python
www.edureka.co/pythonData Science Certification Training
Topics Covered in Today’s Training
What is Regression?
Logistic regression: What and Why?
Linear Vs Logistic Regression
Use- Cases
Demo
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
What Is Regression
www.edureka.co/pythonData Science Certification Training
What is Regression?
Regression Analysis is a predictive modelling technique
It estimates the relationship between a dependent (target)
and an independent variable(predictor)
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Logistic Regression:
What And Why
www.edureka.co/pythonData Science Certification Training
Logistic Regression: What And Why?
Logistic Regression produces results in a binary format which is used to predict the outcome of a
categorical dependent variable. So the outcome should be discrete/ categorical such as:
No Code required to implement RPA
No Downtime.
24/7 up and running
Improved Accuracy
Reduced Costs
0 OR 1
Yes OR No
True OR False
High And Low
www.edureka.co/pythonData Science Certification Training
Why Not Linear Regression?
Y-axis
X-axis
0
1
Since our value of Y
will be between 0
and 1, the linear line
has to be clipped at
0 and 1.
www.edureka.co/pythonData Science Certification Training
Why Not Linear Regression?
Y-axis
X-axis
0
1
With this, our resulting
curve cannot be
formulated into a
single formula.
Hence we came up
with Logistic!
www.edureka.co/pythonData Science Certification Training
Logistic Regression Curve
The Sigmoid “S”
Curve
www.edureka.co/pythonData Science Certification Training
The Sigmoid “S”
Curve
With this, the
threshold value
indicates the
probability of winning
or losing
0.5
THRESHOLD VALUE
Logistic Regression Curve
www.edureka.co/pythonData Science Certification Training
The Logistic Regression Equation is derived from the Straight Line Equation
Logistic Regression Equation
Equation of a straight line
Y = C + BIX1 + B2X2 +…. Range is from –(infinity) to (infinity)
www.edureka.co/pythonData Science Certification Training
The Logistic Regression Equation is derived from the Straight Line Equation
Logistic Regression Equation
Equation of a straight line
Y = C + BIX1 + B2X2 +…. Range is from –(infinity) to (infinity)
Let’s try to reduce the Logistic Regression Equation from Straight Line Equation
Y = C + BIX1 + B2X2 +…. In Logistic equation Y can be only from 0 to 1
www.edureka.co/pythonData Science Certification Training
Logistic Regression Equation
Equation of a straight line
Range is from –(infinity) to (infinity)
Let’s try to reduce the Logistic Regression Equation from Straight Line Equation
In Logistic equation Y can be only from 0 to 1
Now , to get the range of Y between 0 and infinity, let’s transform Y
Now, the range is between 0 to infinity
The Logistic Regression Equation is derived from the Straight Line Equation
Y = C + BIX1 + B2X2 +….
Y = C + BIX1 + B2X2 +….
Y= 0 then 0
Y= 1 then infinity
Y
1-Y
www.edureka.co/pythonData Science Certification Training
Logistic Regression Equation
Equation of a straight line
Range is from –(infinity) to (infinity)
Let’s try to reduce the Logistic Regression Equation from Straight Line Equation
In Logistic equation Y can be only from 0 to 1
Now , to get the range of Y between 0 and infinity, let’s transform Y
Now, the range is between 0 to infinity
Let us transform it further, to get range between –(infinity) and (infinity)
log Y
1-Y
Y = C + BIX1 + B2X2 +…. Final Logistic Regression Equation
The Logistic Regression Equation is derived from the Straight Line Equation
Y = C + BIX1 + B2X2 +….
Y = C + BIX1 + B2X2 +….
Y= 0 then 0
Y= 1 then infinity
Y
1-Y
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Linear
Logistic
www.edureka.co/pythonData Science Certification Training
Linear Vs Logistic Regression
Linear Regression Logistic Regression
Continuous variables1
Solves Regression Problems2
Straight line3
Categorical variables1
Solves Classification Problems2
S-Curve3
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Logistic Regression:
Use - Cases
www.edureka.co/pythonData Science Certification Training
Logistic Regression: Use - Cases
Weather
Predictions
www.edureka.co/pythonData Science Certification Training
Logistic Regression: Use - Cases
Classification
Problems
www.edureka.co/pythonData Science Certification Training
Logistic Regression: Use - Cases
Determines
Illness
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Demo
www.edureka.co/pythonData Science Certification Training
1
Titanic Data Analysis
Explore titanic dataset and explore about the people, both those who survived and those who did
not. With today's technology, answering questions through data analysis is now easier than ever.
1
What factors made people more likely to
survive the sinking of the Titanic?
www.edureka.co/pythonData Science Certification Training
Titanic Dataset
www.edureka.co/pythonData Science Certification Training
Implement Logistic Regression
Analyzing Data
1
2
3
4
5
Collecting Data
Train & Test
Data Wrangling
Accuracy Check
www.edureka.co/pythonData Science Certification Training
Implement Logistic Regression
1
2
3
4
5
Collect Data: Import Libraries
www.edureka.co/pythonData Science Certification Training
Implement Logistic Regression
1
2
3
4
5
Analyzing Data
Creating different plot to check
relationship between variables
www.edureka.co/pythonData Science Certification Training
Implement Logistic Regression
1
2
3
4
5
Analyzing Data
Creating different plot to check
relationship between variables
www.edureka.co/pythonData Science Certification Training
Implement Logistic Regression
1
2
3
4
5
Data Wrangling
Clean the data by removing
the Nan values and
unnecessary columns in the
dataset
www.edureka.co/pythonData Science Certification Training
Implement Logistic Regression
1
2
3
4
5
Train & Test Data
Build the model on the train
data and predict the output on
the test data
logistic = LogisticRegression()
logistic.fit(train_X,train_Y)
www.edureka.co/pythonData Science Certification Training
Implement Logistic Regression
1
2
3
4
5
Accuracy Check
Calculate accuracy to check how
accurate your results are.
from sklearn.metrics import accuracy_score
accuracy_score(y_test,predictions)*100
www.edureka.co/pythonData Science Certification Training
SUV Data Analysis
What factors made people more
interested in buying SUV?
1 A car company has released a new SUV in the market. Using the previous data about the sales of their
SUV’s, they want to predict the category of people who might be interested in buying this.
2
www.edureka.co/pythonData Science Certification Training
SUV Predictions
www.edureka.co/pythonData Science Certification Training
Session in a Minute
What is regression? Logistic: What & Why?
Use - Cases
Linear VS Logistic
Demo2: SUV PredictionDemo1: Titanic Analysis
No Code required
to implement RPA
No Downtime.
24/7 up and running
Improved Accuracy
Reduced Costs
0 And 1
Yes And No
True And False
High And Low
Linear Regression Logistic Regression
Continuous variables1
Solves Regression Problems2
Straight line Curve3
Categorical variables1
Solves Classification Problems2
S-Curve3
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Don’t just learn it, MASTER it with
Logistic Regression in Python | Logistic Regression Example | Machine Learning Algorithms | Edureka

More Related Content

What's hot (20)

PDF
03 Machine Learning Linear Algebra
Andres Mendez-Vazquez
 
PDF
Introduction to Machine Learning Classifiers
Functional Imperative
 
PPTX
Random forest algorithm
Rashid Ansari
 
PDF
Linear regression
MartinHogg9
 
ODP
NAIVE BAYES CLASSIFIER
Knoldus Inc.
 
PDF
Introduction to Statistical Machine Learning
mahutte
 
PDF
Inference in Bayesian Networks
guestfee8698
 
ODP
Machine Learning With Logistic Regression
Knoldus Inc.
 
PDF
Logistic regression
VARUN KUMAR
 
PDF
Principal Component Analysis
Ricardo Wendell Rodrigues da Silveira
 
PDF
An introduction to Machine Learning
butest
 
PPTX
ML - Simple Linear Regression
Andrew Ferlitsch
 
PDF
Linear models for classification
Sung Yub Kim
 
PPTX
Lecture 18: Gaussian Mixture Models and Expectation Maximization
butest
 
PPTX
Logistic regression
YashwantGahlot1
 
PPTX
Support vector machine
zekeLabs Technologies
 
PPTX
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
Simplilearn
 
PPTX
Naive Bayes Presentation
Md. Enamul Haque Chowdhury
 
PPTX
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Simplilearn
 
PPTX
Gradient descent method
Prof. Neeta Awasthy
 
03 Machine Learning Linear Algebra
Andres Mendez-Vazquez
 
Introduction to Machine Learning Classifiers
Functional Imperative
 
Random forest algorithm
Rashid Ansari
 
Linear regression
MartinHogg9
 
NAIVE BAYES CLASSIFIER
Knoldus Inc.
 
Introduction to Statistical Machine Learning
mahutte
 
Inference in Bayesian Networks
guestfee8698
 
Machine Learning With Logistic Regression
Knoldus Inc.
 
Logistic regression
VARUN KUMAR
 
Principal Component Analysis
Ricardo Wendell Rodrigues da Silveira
 
An introduction to Machine Learning
butest
 
ML - Simple Linear Regression
Andrew Ferlitsch
 
Linear models for classification
Sung Yub Kim
 
Lecture 18: Gaussian Mixture Models and Expectation Maximization
butest
 
Logistic regression
YashwantGahlot1
 
Support vector machine
zekeLabs Technologies
 
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
Simplilearn
 
Naive Bayes Presentation
Md. Enamul Haque Chowdhury
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Simplilearn
 
Gradient descent method
Prof. Neeta Awasthy
 

Similar to Logistic Regression in Python | Logistic Regression Example | Machine Learning Algorithms | Edureka (20)

PDF
Logistic Regression in R | Machine Learning Algorithms | Data Science Trainin...
Edureka!
 
PPTX
Logistic Regression.pptx
Muskaan194530
 
PPT
Logistic regression.ppt
BalaChowdappa1
 
PPTX
Logistic Regression in machine learning ppt
raminder12_kaur
 
PDF
Logistic Regression: Behind the Scenes
Chris White
 
PDF
3ml.pdf
MianAdnan27
 
PPTX
Logistics Regression Using Python.pptx
SharmilaMore5
 
PDF
logisticregression-190726150723.pdf
SuaibDanish
 
PDF
Logistic regression
Rupak Roy
 
PPTX
Linear Regression and Logistic Regression in ML
Kumud Arora
 
PPTX
Lecture 3.1_ Logistic Regression.pptx
ajondaree
 
PDF
Logistic regression, machine learning algorithms
Learnbay Datascience
 
PPTX
Lecture 3.1_ Logistic Regression powerpoint
zahidwadiwale
 
PPTX
Machine_Learning.pptx
VickyKumar131533
 
PPTX
MACHINE LEARNING Unit -2 Algorithm.pptx
ARVIND SARDAR
 
PPTX
Supervised Machine Learning Algorithms
engrfarhanhanif
 
PPTX
Logistical Regression.pptx
Ramakrishna Reddy Bijjam
 
PDF
Machine Learning Algorithm - Logistic Regression
Kush Kulshrestha
 
PPTX
Group 20_Logistic Regression devara.pptx
sriaditya070304
 
PDF
Logistic regression in_python_tutorial
SALWAidrissiakhannou
 
Logistic Regression in R | Machine Learning Algorithms | Data Science Trainin...
Edureka!
 
Logistic Regression.pptx
Muskaan194530
 
Logistic regression.ppt
BalaChowdappa1
 
Logistic Regression in machine learning ppt
raminder12_kaur
 
Logistic Regression: Behind the Scenes
Chris White
 
3ml.pdf
MianAdnan27
 
Logistics Regression Using Python.pptx
SharmilaMore5
 
logisticregression-190726150723.pdf
SuaibDanish
 
Logistic regression
Rupak Roy
 
Linear Regression and Logistic Regression in ML
Kumud Arora
 
Lecture 3.1_ Logistic Regression.pptx
ajondaree
 
Logistic regression, machine learning algorithms
Learnbay Datascience
 
Lecture 3.1_ Logistic Regression powerpoint
zahidwadiwale
 
Machine_Learning.pptx
VickyKumar131533
 
MACHINE LEARNING Unit -2 Algorithm.pptx
ARVIND SARDAR
 
Supervised Machine Learning Algorithms
engrfarhanhanif
 
Logistical Regression.pptx
Ramakrishna Reddy Bijjam
 
Machine Learning Algorithm - Logistic Regression
Kush Kulshrestha
 
Group 20_Logistic Regression devara.pptx
sriaditya070304
 
Logistic regression in_python_tutorial
SALWAidrissiakhannou
 
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
PDF
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
PDF
Tableau Tutorial for Data Science | Edureka
Edureka!
 
PDF
Python Programming Tutorial | Edureka
Edureka!
 
PDF
Top 5 PMP Certifications | Edureka
Edureka!
 
PDF
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
PDF
Linux Mint Tutorial | Edureka
Edureka!
 
PDF
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
PDF
Importance of Digital Marketing | Edureka
Edureka!
 
PDF
RPA in 2020 | Edureka
Edureka!
 
PDF
Email Notifications in Jenkins | Edureka
Edureka!
 
PDF
EA Algorithm in Machine Learning | Edureka
Edureka!
 
PDF
Cognitive AI Tutorial | Edureka
Edureka!
 
PDF
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
PDF
Blue Prism Top Interview Questions | Edureka
Edureka!
 
PDF
Big Data on AWS Tutorial | Edureka
Edureka!
 
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
PDF
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
PDF
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 

Logistic Regression in Python | Logistic Regression Example | Machine Learning Algorithms | Edureka

  • 2. www.edureka.co/pythonData Science Certification Training Topics Covered in Today’s Training What is Regression? Logistic regression: What and Why? Linear Vs Logistic Regression Use- Cases Demo
  • 3. Copyright © 2018, edureka and/or its affiliates. All rights reserved. What Is Regression
  • 4. www.edureka.co/pythonData Science Certification Training What is Regression? Regression Analysis is a predictive modelling technique It estimates the relationship between a dependent (target) and an independent variable(predictor)
  • 5. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Logistic Regression: What And Why
  • 6. www.edureka.co/pythonData Science Certification Training Logistic Regression: What And Why? Logistic Regression produces results in a binary format which is used to predict the outcome of a categorical dependent variable. So the outcome should be discrete/ categorical such as: No Code required to implement RPA No Downtime. 24/7 up and running Improved Accuracy Reduced Costs 0 OR 1 Yes OR No True OR False High And Low
  • 7. www.edureka.co/pythonData Science Certification Training Why Not Linear Regression? Y-axis X-axis 0 1 Since our value of Y will be between 0 and 1, the linear line has to be clipped at 0 and 1.
  • 8. www.edureka.co/pythonData Science Certification Training Why Not Linear Regression? Y-axis X-axis 0 1 With this, our resulting curve cannot be formulated into a single formula. Hence we came up with Logistic!
  • 9. www.edureka.co/pythonData Science Certification Training Logistic Regression Curve The Sigmoid “S” Curve
  • 10. www.edureka.co/pythonData Science Certification Training The Sigmoid “S” Curve With this, the threshold value indicates the probability of winning or losing 0.5 THRESHOLD VALUE Logistic Regression Curve
  • 11. www.edureka.co/pythonData Science Certification Training The Logistic Regression Equation is derived from the Straight Line Equation Logistic Regression Equation Equation of a straight line Y = C + BIX1 + B2X2 +…. Range is from –(infinity) to (infinity)
  • 12. www.edureka.co/pythonData Science Certification Training The Logistic Regression Equation is derived from the Straight Line Equation Logistic Regression Equation Equation of a straight line Y = C + BIX1 + B2X2 +…. Range is from –(infinity) to (infinity) Let’s try to reduce the Logistic Regression Equation from Straight Line Equation Y = C + BIX1 + B2X2 +…. In Logistic equation Y can be only from 0 to 1
  • 13. www.edureka.co/pythonData Science Certification Training Logistic Regression Equation Equation of a straight line Range is from –(infinity) to (infinity) Let’s try to reduce the Logistic Regression Equation from Straight Line Equation In Logistic equation Y can be only from 0 to 1 Now , to get the range of Y between 0 and infinity, let’s transform Y Now, the range is between 0 to infinity The Logistic Regression Equation is derived from the Straight Line Equation Y = C + BIX1 + B2X2 +…. Y = C + BIX1 + B2X2 +…. Y= 0 then 0 Y= 1 then infinity Y 1-Y
  • 14. www.edureka.co/pythonData Science Certification Training Logistic Regression Equation Equation of a straight line Range is from –(infinity) to (infinity) Let’s try to reduce the Logistic Regression Equation from Straight Line Equation In Logistic equation Y can be only from 0 to 1 Now , to get the range of Y between 0 and infinity, let’s transform Y Now, the range is between 0 to infinity Let us transform it further, to get range between –(infinity) and (infinity) log Y 1-Y Y = C + BIX1 + B2X2 +…. Final Logistic Regression Equation The Logistic Regression Equation is derived from the Straight Line Equation Y = C + BIX1 + B2X2 +…. Y = C + BIX1 + B2X2 +…. Y= 0 then 0 Y= 1 then infinity Y 1-Y
  • 15. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Linear Logistic
  • 16. www.edureka.co/pythonData Science Certification Training Linear Vs Logistic Regression Linear Regression Logistic Regression Continuous variables1 Solves Regression Problems2 Straight line3 Categorical variables1 Solves Classification Problems2 S-Curve3
  • 17. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Logistic Regression: Use - Cases
  • 18. www.edureka.co/pythonData Science Certification Training Logistic Regression: Use - Cases Weather Predictions
  • 19. www.edureka.co/pythonData Science Certification Training Logistic Regression: Use - Cases Classification Problems
  • 20. www.edureka.co/pythonData Science Certification Training Logistic Regression: Use - Cases Determines Illness
  • 21. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Demo
  • 22. www.edureka.co/pythonData Science Certification Training 1 Titanic Data Analysis Explore titanic dataset and explore about the people, both those who survived and those who did not. With today's technology, answering questions through data analysis is now easier than ever. 1 What factors made people more likely to survive the sinking of the Titanic?
  • 24. www.edureka.co/pythonData Science Certification Training Implement Logistic Regression Analyzing Data 1 2 3 4 5 Collecting Data Train & Test Data Wrangling Accuracy Check
  • 25. www.edureka.co/pythonData Science Certification Training Implement Logistic Regression 1 2 3 4 5 Collect Data: Import Libraries
  • 26. www.edureka.co/pythonData Science Certification Training Implement Logistic Regression 1 2 3 4 5 Analyzing Data Creating different plot to check relationship between variables
  • 27. www.edureka.co/pythonData Science Certification Training Implement Logistic Regression 1 2 3 4 5 Analyzing Data Creating different plot to check relationship between variables
  • 28. www.edureka.co/pythonData Science Certification Training Implement Logistic Regression 1 2 3 4 5 Data Wrangling Clean the data by removing the Nan values and unnecessary columns in the dataset
  • 29. www.edureka.co/pythonData Science Certification Training Implement Logistic Regression 1 2 3 4 5 Train & Test Data Build the model on the train data and predict the output on the test data logistic = LogisticRegression() logistic.fit(train_X,train_Y)
  • 30. www.edureka.co/pythonData Science Certification Training Implement Logistic Regression 1 2 3 4 5 Accuracy Check Calculate accuracy to check how accurate your results are. from sklearn.metrics import accuracy_score accuracy_score(y_test,predictions)*100
  • 31. www.edureka.co/pythonData Science Certification Training SUV Data Analysis What factors made people more interested in buying SUV? 1 A car company has released a new SUV in the market. Using the previous data about the sales of their SUV’s, they want to predict the category of people who might be interested in buying this. 2
  • 33. www.edureka.co/pythonData Science Certification Training Session in a Minute What is regression? Logistic: What & Why? Use - Cases Linear VS Logistic Demo2: SUV PredictionDemo1: Titanic Analysis No Code required to implement RPA No Downtime. 24/7 up and running Improved Accuracy Reduced Costs 0 And 1 Yes And No True And False High And Low Linear Regression Logistic Regression Continuous variables1 Solves Regression Problems2 Straight line Curve3 Categorical variables1 Solves Classification Problems2 S-Curve3
  • 34. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Don’t just learn it, MASTER it with