O'Reilly logo

Python Business Intelligence Cookbook by Robert Dempsey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performing outlier detection

Outlier detection is used to find outliers in the data that can throw off your analysis. Outliers come in two flavors: Univariate and Multivariate. A univariate outlier is a data point that consists of an extreme value on one variable. Univariate outliers can be seen when looking at a single variable. A multivariate outlier is a combination of unusual scores on at least two variables, and are found in multidimensional data.

For this recipe, we are going to use the college dataset from An Introduction to Statistical Learning with Applications in R.

How to do it…

  1. First, import the Python libraries that you need:
    import pandas as pd import numpy as np import matplotlib as plt import matplotlib.pyplot as plt %matplotlib inline ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required