From the course: Machine Learning with Python: Logistic Regression

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Making predictions with logistic regression

Making predictions with logistic regression - Python Tutorial

From the course: Machine Learning with Python: Logistic Regression

Making predictions with logistic regression

- [Narrator] Logistic regression is most often used to solve classification problems because that allows us to predict the probability of a categorical value Y for any given X. For example. Suppose that we have a logistic regression function like this that models the probability of a customer renting an e-bike as a function of their age. By doing the math, we can predict that the probability of a 35 year old customer renting an e-bike is 14.8%. If we use a 50% cutoff threshold then we interpret the prediction of 0.148 as no. According to this model, a 35 year old customer is unlikely to rent an e-bike. Statistically speaking, modeling the value of a variable with a restricted range, such probability can be challenging. It is also rather difficult to properly interpret the non-linear relationship that exists between predictors and the response as represented by the logistic function. So instead of using the logistic…

Contents