A. mlwpy.py Listing

# common import abbreviations import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import seaborn as sns import pandas as pd import patsy import itertools as it import collections as co import functools as ft import os.path as osp import glob import textwrap import warnings warnings.filterwarnings("ignore") # some warnings are stubborn in the extreme, we don't want # them in the book def warn(*args, **kwargs): pass warnings.warn = warn # config related np.set_printoptions(precision=4, suppress=True) pd.options.display.float_format = '{:20,.4f}'.format # there are good reasons *NOT* to do this in any real production code # for our purposes (writing a book with completely ...

Get Machine Learning with Python for Everyone now with O’Reilly online learning.

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