- Start within IPython with several imports, including numpy, pandas, and matplotlib for visualization:
import numpy as npimport pandas as pdimport matplotlib.pyplot as plt%matplotlib inline
- It is worth looking at a Q-Q plot. We'll use scipy here because it has a built-in probability plot:
from scipy.stats import probplotf = plt.figure(figsize=(7, 5))ax = f.add_subplot(111)tuple_out = probplot(boston.target - predictions_cv, plot=ax)
The following screenshot shows the probability plot:
- Type tuple_out and you will get the following:
(4.4568597454452306, -2.9208080837569337e-15, 0.94762914118318298)
This is a tuple of ...