Knowledge check

Completed

Answer the following questions to check your learning.

1.

You are using scikit-learn to train a regression model from a dataset of sales data. You want to be able to evaluate the model to ensure it predicts accurately with new data. What should you do?

2.

You have created a model object using the scikit-learn LinearRegression class. What should you do to train the model?

3.

You train a regression model using scikit-learn. When you evaluate it with test data, you determine that the model achieves an R-squared metric of 0.95. What does this metric tell you about the model?