TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Follow publication

Member-only story

Multivariate outlier detection in Python

Six methods to be able to detect outliers/anomalies in your dataset

Philip Wilkinson, Ph.D.
TDS Archive
Published in
12 min readAug 16, 2021

--

Photo by davisuko on Unsplash

In my previous medium article I introduced five different methods for Univariate outlier detection: Distribution plot, Z-score, Boxplot, Tukey fences and clustering. This highlighted the fact that several different methods can be used to detect outliers in your data, but that each of these can lead to different conclusions. As such, in selecting which method to use you should pay attention to the context of the data and what domain knowledge would also suggest would be classed as an outlier.

Often however, data is collected from multiple sources, sensors and time periods creating multiple variables that could interact with your target variable. This means that analysis or machine learning methods are often applied in the cases where you have more than one variable to analyse. This means that it is often more crucial to be able to detect outliers as a result of the interaction between these variables rather than just detecting outliers from a single variable. This article therefore seeks to identify several different methods for this purpose.

As before, the Pokémon dataset is used to demonstrate these methods, with data from 801 Pokémon from 7 seasons. This will focus on the Attack and Defense attributes from this…

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Philip Wilkinson, Ph.D.
Philip Wilkinson, Ph.D.

Written by Philip Wilkinson, Ph.D.

Specialist Software Engineer at McLaren Racing Limited. 500,000+ views. Connect on: www.linkedin.com/in/philip-wilkinson1

No responses yet

Write a response