Introduction

In the previous lectures, we talked about parametric density estimations:

An important limitation of this approach is that the chosen density might be a poor model of the distribution that generates the data, which can result in poor predictive performance. For instance, if the process that generates the data is multimodal, then this aspect of the distribution can never be captured by a Gaussian, which is necessarily unimodal.

In this lesson, we consider some non-parametric density estimations that make few assumptions about the form of the distribution:

Popular non-parametric algorithms are Parzen, k-Nearest Neighbours, Naïve Bayes.

Assume we have a 1D dataset, with just one feature, of 40 samples:

Untitled

How could we estimate the probability density? One of the simplest ways is using histograms, which allow you to locally estimate the densities for a single point in your feature space.

Remember that a histogram is a graph in which values of observations are plotted on the horizontal axis, and the frequency with which each value occurs in the data set is plotted on the vertical axis.

So, what we do is:

Untitled