Identifying outlier fares with anomaly detection techniques

There are various rigorous definitions of outliers, but for our purposes, an outlier is any extreme value that is far from the other observations in the dataset. There are numerous techniques, both parametric and non-parametric, that are used to identify outliers; example algorithms include density-based spatial clustering of applications with noise (DBSCAN), isolation forests, and Grubbs' Test. Typically, the type of data determines the type of algorithm that is used. For example, some algorithms do better on multivariate data than univariate data. Here, we are dealing with univariate time-series data, so we'll want to choose an algorithm that handles that well.

If you aren't familiar ...

Get Python Machine Learning Blueprints - Second Edition now with O’Reilly online learning.

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