Churn Prediction with Logistic Regression

Learn how to build and train a logistic regression class to predict customer churn.

In this lesson, we will go through the steps to build a customer churn prediction model using logistic regression.

Logistic regression

Logistic regression is a supervised machine learning algorithm that predicts binary response variables. It models the probability of an event occurring. For example, it could predict the likelihood of being infected with COVID-19 (yes or no) or estimating whether a customer will continue to use a service (yes or no).

Logistic regression models the logarithm of the odds ratio, which is the log of the probability of the event occurring divided by the probability of the event not occurring. The range of the logit function is between - ∞ and . For example, if the probability of churn is 75%, then the probability of no churn would be 25%. Therefore, the odds ratio will be 75% divided by 25%, which equals 3, and the logarithm of 3 is around 0.48. This indicates that the probability of the event occurring is somewhat likely but not certain.

Here's the formula for logistic regression.

Get hands-on with 1200+ tech skills courses.