Lecture 20 – Data 100, Summer 2021

by Suraj Rampure

Thresholding in Logistic Regression

So far, our logistic regression model predicts probabilities. But we originally set out on a mission to create a classifier. How can we use our predicted probabilities to create classifications?

Let's get back the NBA data we had last time.

Let's call this model basic_model since it only has one feature. (Eventually, we will use more features.)

It is the same model we fit in the last lecture.

As before, we can use .predict_proba to get the predicted probabilities for each class under our logistic regression model.

We can plot our model, too: