July 2017
Beginner to intermediate
420 pages
10h 56m
English
So, let's take some example code, and see how you might handle outliers in practice. Let's mess around with some outliers. It's a pretty simple section. A little bit of review actually. If you want to follow along, we're in Outliers.ipynb. So, go ahead and open that up if you'd like:
import numpy as npincomes = np.random.normal(27000, 15000, 10000)incomes = np.append(incomes, [1000000000])import matplotlib.pyplot as pltplt.hist(incomes, 50)plt.show()
We did something very similar, very early in the book, where we created a fake histogram of income distribution in the United States. What we're going to do is start off with a normal distribution of incomes here that are have a mean of $27,000 per year, with a standard ...
Read now
Unlock full access