SlideShare a Scribd company logo
1 of 19
Download to read offline
Logistic Regression
What is Logistic Regression?
Logistic Regression is a type of classification model based on supervised learning.
In supervised learning, we train the model using data which is well labelled that
means the data is already tagged with correct answers. Here, the feature values
will be independent variables and the target value will be dependent variable.
What is Logistic Regression? continues...
Logistic Regression is a statistical method for analyzing a dataset in which there
are one or more independent variables that determine an outcome. The outcome
is measured using Maximum Likelihood of occurring of an event.
Problems that can be solved using Logistic Regression
● How likely a Netflix user will pay for a particular series?
● How likely India will win the Cricket World Cup?
● How likely a test score of a student will help him to get admitted to a
university?
● How likely a politician’s tweet is positive or negative?
Types of Logistic Regression
● Binary Logistic Regression: It is used when there are only 2 outcome
category.
● Multinomial Logistic Regression: It is used when there are more than 2
outcome category.
When should we use Logistic Regression?
● When there is no linear relationship between dependent variable and
independent variable.
● Logistic Regression is more robust to outliers than the Linear Regression.
(hint: Log function vs squared function)
Hyperparameter in Logistic Regression
Learning Rate: The rate at which the weights of the model is updated. (too small
value: optimization rate will be very small, too large value: model won’t converge
to best value)
Early stopping (max_iter): It is used so that the model does not overfit with the
training data. So, we stop the training as soon as we get the best TEST score.
To optimize the hyperparameters, we use a method called Grid Search to
find the best combination of hyperparameters value for the model.
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
How Logistic Regression works?
During training, the model involves mostly in following things:
Input: feature values
Output: predicted values
Sigmoid: apply sigmoid function on Output
Error: find error using Log-loss formula
Update: update weight and bias of the classification line
Demo
https://github.com/rajatsharma369007/Gradient_Descent_Algorithm/blob/master/G
radientdescent.ipynb
Advantages
➢ It is widely used technique because it is very efficient, doesn’t require too
many computational resources, it’s highly interpretable, it doesn’t require input
features to be scaled,it doesn’t require any tuning, it’s easy to regularize and it
outputs well-calibrated predicted probabilities.
➢ It is incredibly easy and quick to implement and very efficient to train.
Because of these facts, Logistic Regression is a good baseline that we can
use to measure the performance of other more complex algorithms.
➢ It works better when we remove the attributes that are unrelated to the output
variable as well as the attributes that are very similar(correlated) to each
other.
Disadvantages
➢ Logistic Regression is not one of the most powerful algorithms and can be
easily outperformed by the more complex ones.
➢ Another disadvantage is its high reliance on a proper presentation of our data.
And this means that it is not a useful tool unless we have already identified all
the important independent variables.
➢ Since its outcome is discrete,Logistic Regression can only predict a
Categorical Outcome.
THANK YOU !

More Related Content

Similar to logisticregression-190726150723.pdf

Machine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demoMachine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demoHridyesh Bisht
 
Understanding GBM and XGBoost in Scikit-Learn
Understanding GBM and XGBoost in Scikit-LearnUnderstanding GBM and XGBoost in Scikit-Learn
Understanding GBM and XGBoost in Scikit-Learn철민 권
 
Barga Data Science lecture 10
Barga Data Science lecture 10Barga Data Science lecture 10
Barga Data Science lecture 10Roger Barga
 
Machine Learning in the Financial Industry
Machine Learning in the Financial IndustryMachine Learning in the Financial Industry
Machine Learning in the Financial IndustrySubrat Panda, PhD
 
Aspiring Minds | Automata
Aspiring Minds | Automata Aspiring Minds | Automata
Aspiring Minds | Automata Aspiring Minds
 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxajondaree
 
Building Continuous Learning Systems
Building Continuous Learning SystemsBuilding Continuous Learning Systems
Building Continuous Learning SystemsAnuj Gupta
 
Scaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflowScaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflowDatabricks
 
Penalized Logistic Regression methods .pptx
Penalized Logistic Regression methods .pptxPenalized Logistic Regression methods .pptx
Penalized Logistic Regression methods .pptxhamdy53
 
Tuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques WebinarTuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques WebinarSigOpt
 
Thomas Jensen. Machine Learning
Thomas Jensen. Machine LearningThomas Jensen. Machine Learning
Thomas Jensen. Machine LearningVolha Banadyseva
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models ananth
 
Applied Machine Learning for Ranking Products in an Ecommerce Setting
Applied Machine Learning for Ranking Products in an Ecommerce SettingApplied Machine Learning for Ranking Products in an Ecommerce Setting
Applied Machine Learning for Ranking Products in an Ecommerce SettingDatabricks
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Simplilearn
 
MLSD18. Supervised Workshop
MLSD18. Supervised WorkshopMLSD18. Supervised Workshop
MLSD18. Supervised WorkshopBigML, Inc
 
Introduction to optimization for deep learning
Introduction to optimization for deep learningIntroduction to optimization for deep learning
Introduction to optimization for deep learningAli Madani
 
Proximal Policy Optimization
Proximal Policy OptimizationProximal Policy Optimization
Proximal Policy OptimizationShubhaManikarnike
 

Similar to logisticregression-190726150723.pdf (20)

Machine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demoMachine learning Algorithms with a Sagemaker demo
Machine learning Algorithms with a Sagemaker demo
 
Demystifying Xgboost
Demystifying XgboostDemystifying Xgboost
Demystifying Xgboost
 
Understanding GBM and XGBoost in Scikit-Learn
Understanding GBM and XGBoost in Scikit-LearnUnderstanding GBM and XGBoost in Scikit-Learn
Understanding GBM and XGBoost in Scikit-Learn
 
Barga Data Science lecture 10
Barga Data Science lecture 10Barga Data Science lecture 10
Barga Data Science lecture 10
 
Machine Learning in the Financial Industry
Machine Learning in the Financial IndustryMachine Learning in the Financial Industry
Machine Learning in the Financial Industry
 
Aspiring Minds | Automata
Aspiring Minds | Automata Aspiring Minds | Automata
Aspiring Minds | Automata
 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptx
 
Building Continuous Learning Systems
Building Continuous Learning SystemsBuilding Continuous Learning Systems
Building Continuous Learning Systems
 
Scaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflowScaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflow
 
Penalized Logistic Regression methods .pptx
Penalized Logistic Regression methods .pptxPenalized Logistic Regression methods .pptx
Penalized Logistic Regression methods .pptx
 
Tuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques WebinarTuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques Webinar
 
Thomas Jensen. Machine Learning
Thomas Jensen. Machine LearningThomas Jensen. Machine Learning
Thomas Jensen. Machine Learning
 
Test AI/ML Applications
Test AI/ML ApplicationsTest AI/ML Applications
Test AI/ML Applications
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
 
Applied Machine Learning for Ranking Products in an Ecommerce Setting
Applied Machine Learning for Ranking Products in an Ecommerce SettingApplied Machine Learning for Ranking Products in an Ecommerce Setting
Applied Machine Learning for Ranking Products in an Ecommerce Setting
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
 
4.1.pptx
4.1.pptx4.1.pptx
4.1.pptx
 
MLSD18. Supervised Workshop
MLSD18. Supervised WorkshopMLSD18. Supervised Workshop
MLSD18. Supervised Workshop
 
Introduction to optimization for deep learning
Introduction to optimization for deep learningIntroduction to optimization for deep learning
Introduction to optimization for deep learning
 
Proximal Policy Optimization
Proximal Policy OptimizationProximal Policy Optimization
Proximal Policy Optimization
 

Recently uploaded

KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Recently uploaded (20)

KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

logisticregression-190726150723.pdf

  • 2. What is Logistic Regression? Logistic Regression is a type of classification model based on supervised learning. In supervised learning, we train the model using data which is well labelled that means the data is already tagged with correct answers. Here, the feature values will be independent variables and the target value will be dependent variable.
  • 3. What is Logistic Regression? continues... Logistic Regression is a statistical method for analyzing a dataset in which there are one or more independent variables that determine an outcome. The outcome is measured using Maximum Likelihood of occurring of an event.
  • 4. Problems that can be solved using Logistic Regression ● How likely a Netflix user will pay for a particular series? ● How likely India will win the Cricket World Cup? ● How likely a test score of a student will help him to get admitted to a university? ● How likely a politician’s tweet is positive or negative?
  • 5. Types of Logistic Regression ● Binary Logistic Regression: It is used when there are only 2 outcome category. ● Multinomial Logistic Regression: It is used when there are more than 2 outcome category.
  • 6. When should we use Logistic Regression? ● When there is no linear relationship between dependent variable and independent variable. ● Logistic Regression is more robust to outliers than the Linear Regression. (hint: Log function vs squared function)
  • 7. Hyperparameter in Logistic Regression Learning Rate: The rate at which the weights of the model is updated. (too small value: optimization rate will be very small, too large value: model won’t converge to best value) Early stopping (max_iter): It is used so that the model does not overfit with the training data. So, we stop the training as soon as we get the best TEST score. To optimize the hyperparameters, we use a method called Grid Search to find the best combination of hyperparameters value for the model.
  • 8. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 9. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 10. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 11. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 12. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 13. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 14. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 15. How Logistic Regression works? During training, the model involves mostly in following things: Input: feature values Output: predicted values Sigmoid: apply sigmoid function on Output Error: find error using Log-loss formula Update: update weight and bias of the classification line
  • 17. Advantages ➢ It is widely used technique because it is very efficient, doesn’t require too many computational resources, it’s highly interpretable, it doesn’t require input features to be scaled,it doesn’t require any tuning, it’s easy to regularize and it outputs well-calibrated predicted probabilities. ➢ It is incredibly easy and quick to implement and very efficient to train. Because of these facts, Logistic Regression is a good baseline that we can use to measure the performance of other more complex algorithms. ➢ It works better when we remove the attributes that are unrelated to the output variable as well as the attributes that are very similar(correlated) to each other.
  • 18. Disadvantages ➢ Logistic Regression is not one of the most powerful algorithms and can be easily outperformed by the more complex ones. ➢ Another disadvantage is its high reliance on a proper presentation of our data. And this means that it is not a useful tool unless we have already identified all the important independent variables. ➢ Since its outcome is discrete,Logistic Regression can only predict a Categorical Outcome.