density function

Calculate the density level of the dataset