https://medium.com/@monocosmo77/working-with-kernel-density-estimation-part2-machine-learning-af5eb7e5d4a6