General Concepts & Steps
Code & Functions
Attributes & Math Values
100

What does regression search for?

Relationships among variables.

100

Which package is imported as np in Step 1?

numpy

100

Which attribute represents the coefficient b_0?

.intercept_

200

What is Step 1?

Import packages and classes.

200

Which class is imported from sklearn.linear_model?

LinearRegression

200

Which attribute represents b_1?

.coef_

300

What is Step 2?

Provide data.

300

Which method do you need to call on model in Step 3?

.fit()

300

When applying .score(), what are the arguments?

Predictor x and regressor y.

400

What is Step 3?

Create a model and fit it.

400

You can obtain the coefficient of determination (R^2) with which method called on model?

.score()

400

In the code output, what is the value of intercept (rounded in text)?

5.633333333333333

500

What are Step 4 and Step 5?

Step 4: Get results. Step 5: Predict response.

500

To obtain the predicted response, which method do you use?

.predict()

500

In the code output, what is the value of slope?

[0.54]

M
e
n
u