Exercise

Visualizing predictions

The prediction DataFrame you created contains a column of explanatory variable values and a column of response variable values. That means you can plot it on the same scatter plot of response versus explanatory data values.

prediction_data is available. The code for the plot you created using sns.regplot() in Chapter 1 is shown.

Instructions

100 XP
  • Create a new figure to plot multiple layers.
  • Extend the plotting code to add points for the predictions in prediction_data. Color the points red.
  • Display the layered plot.