The Kernel Density estimation is a method to estimate the probability density function of a random variables. We can apply this model to detect outliers in a dataset.

In this tutorial, we'll learn how to detect the outliers of regression
data by applying the KernelDensity class of Scikit-learn API in Python. The
tutorial covers:

- Preparing the data
- Anomaly detection with KernelDensity
- Testing with Boston housing dataset
- Source code listing

We'll start by loading the required libraries for this tutorial.