What does regression search for?
Relationships among variables.
Which package is imported as np in Step 1?
numpy
Which attribute represents the coefficient b_0?
.intercept_
What is Step 1?
Import packages and classes.
Which class is imported from sklearn.linear_model?
LinearRegression
Which attribute represents b_1?
.coef_
What is Step 2?
Provide data.
Which method do you need to call on model in Step 3?
.fit()
When applying .score(), what are the arguments?
Predictor x and regressor y.
What is Step 3?
Create a model and fit it.
You can obtain the coefficient of determination (R^2) with which method called on model?
.score()
In the code output, what is the value of intercept (rounded in text)?
5.633333333333333
What are Step 4 and Step 5?
Step 4: Get results. Step 5: Predict response.
To obtain the predicted response, which method do you use?
.predict()
In the code output, what is the value of slope?
[0.54]