End-to-End ML Project- Beginner friendly

80 / 94

LinearRegression

Let's first train a LinearRegression model on our training dataset and then predict the target variable for the data points.

Refer to LinearRegression documentation for further details about the estimator.

INSTRUCTIONS
  1. Import the estimator LinearRegression from sklearn.linear_model.

  2. Create an instance of the estimator with the name lin_reg.

  3. Train the model on our training dataset i.e. (housing_prepared, housing_labels).

  4. Predict the target variable for our training predictors i.e. (housing_prepared) and store the output in a variable named predictions.



Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...