Aan de slagGa gratis aan de slag

Logistic regression

Let's move on to logistic regression. You'll be working with the same weather dataset again, but the goal here is to predict if it's going to rain tomorrow. We've gone ahead and created your train and test sets for you. Your dependent variables are the Humidity9am and Humidity3pm features.

It's also worth noting that the dataset has already been normalized in order to ensure that we can interpret the coefficients later on. This is always good to bring up during your interview when talking about regression for inference.

Deze oefening maakt deel uit van de cursus

Practicing Statistics Interview Questions in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

from sklearn.linear_model import LogisticRegression

# Create and fit your model
clf = ____
clf.fit(____, ____)
Code bewerken en uitvoeren