Linear models with Seaborn and scikit-learn

  1. Scroll to the empty cells at the bottom of Subtopic Introduction to Predictive Analysis in your Jupyter Notebook. These will be found beneath the linear-model MSE calculation cell under the Activity heading.
You should fill these empty cells in with code as we complete the activity. You may need to insert new cells as these become filled up; please do so as needed!
  1. Given that our data is contained in the DataFrame df, we will first pull out our dependent feature and target variable using the following:
    y = df['MEDV'].values    x = df['LSTAT'].values.reshape(-1,1) 

This is identical to what we did earlier for the linear model.

  1. Check out what x looks like by printing the first few samples with ...

Get Applied Deep Learning with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.