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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.