ComeçarComece de graça

Linear regression

In this exercise, you'll implement a simple linear regression model. Get ready to make predictions, visualize the model fit, and analyze the formula used to generate your fit.

By now, you're probably comfortable with the weather dataset that we'll be using. Your dependent variable will be the Humidity3pm feature. All of the standard packages have been imported for you.

Este exercício faz parte do curso

Practicing Statistics Interview Questions in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

from sklearn.linear_model import LinearRegression 
X = np.array(weather['Humidity9am']).reshape(-1,1)
y = weather['Humidity3pm']

# Create and fit your linear regression model
lm = ____
lm.fit(____, ____)
Editar e executar o código