Machine Learning Tutorial Python – 8: Logistic Regression (Binary Classification)
Logistic regression is used for classification problems in machine learning. This tutorial will show you how to use sklearn logisticregression class to solve binary classification problem to predict if a customer would buy a life insurance. At the end we have an interesting exercise for you to solve.
Usually there are two types of machine learning problems (1) Linear regression where prediction value is continuous (2) Classification where predicted value is categorical. Logistic regression is used for classification problems mainly.
#MachineLearning #PythonMachineLearning #MachineLearningTutorial #Python #PythonTutorial #PythonTraining #MachineLearningCource #LogisticRegression
Exercise: Open above notebook from github and go to the end.
Exercise solution: https://github.com/codebasics/py/blob/master/ML/7_logistic_reg/Exercise/7_logistic_regression_exercise.ipynb
Topics that are covered in this Video:
0:01 – Theory (Explain difference between logic regression and classification)
1:18 – What is logistic regression?
1:26 – Classification types (Binary vs multiclass classification)
1:53 – Explanation of logistic regression using the example of if person will buy insurance based on his age
5:38 – Sigmoid or Logit function
8:18 – Coding (for coding we are using an example of if a person will buy insurance or not based on his age)
14:36 – sklearn predict_proba() function
15:49 – Exercise (Solve a problem of predicting employee retention based on salary, distance to work, promotion, department etc)
Machine Learning Tutorial Python – 8 Logistic Regression (Multiclass Classification): https://www.youtube.com/watch?v=J5bXOOmkopc&list=PLeo1K3hjS3uvCeTYTeyfe0-rN5r8zn9rw&index=9
Data Science Full Course: https://www.youtube.com/playlist?list=PLeo1K3hjS3us_ELKYSj_Fth2tIEkdKXvV
Data Science Project: https://www.youtube.com/watch?v=rdfbcdP75KI&list=PLeo1K3hjS3uu7clOTtwsp94PcHbzqpAdg
Machine learning tutorials: https://www.youtube.com/watch?v=gmvvaobm7eQ&list=PLeo1K3hjS3uvCeTYTeyfe0-rN5r8zn9rw
To download csv and code for all tutorials: go to https://github.com/codebasics/py, click on a green button to clone or download the entire repository and then go to relevant folder to get access to that specific file.