How to do it...

  1. 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
  1. 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( - predictions_cv, plot=ax)

The following screenshot shows the probability plot:

  1. Type tuple_out[1] and you will get the following:
(4.4568597454452306, -2.9208080837569337e-15, 0.94762914118318298)

This is a tuple of ...

Get scikit-learn Cookbook - Second Edition now with O’Reilly online learning.

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