Classic Methods#
Parametric#
Assume Gaussian#
Single Variate#
Entropy#
From Scratch
def entropy_gauss(sigma: float) -> float:
return np.log(2 * np.pi * np.e * sigma**2)
Numpy
from scipy import stats
H_g = stats.norm(scale=sigma).entropy()
Lecture 8: Density Estimation: Parametric Approach - Lecture Notes
Histogram#
Kernel Density Estimation#
Intro to Kernel Density Estimation - Video
Lecture 6: Density Estimation: Histogram and Kernel Density Estimator - Lecture
A Tutorial on KDE and Recent Advances - arxiv (2017)
KDE From Scratch - w Julia
In Depth KDE - Jake
Software
K-Nearest Neighbours#
Paper - k-NEAREST NEIGHBOUR KERNEL DENSITY ESTIMATION, THE CHOICE OF OPTIMAL k
Lecture 7: Density Estimation: k-Nearest Neighbor and Basis Approach - Prezi
KNN Density Estimation, a slecture by Qi Wang - Vid
Non-parametric density estimation - 3: k nearest neighbor - Video
Mod-05 Lec-12 Nonparametric estimation, Parzen Windows, nearest neighbour methods - Video
Modal-set Estimation using kNN graphs, and Applications to Clustering - Video
Entropy#
The full entropy expression:
where:
\(\psi\) - the digamma function.
\(c_d=\frac{\pi^{\frac{d}{2}}}{\Gamma(1+\frac{d}{2})}\)
\(\Gamma\) - is the gamma function
\(\epsilon(i)\) is the distance to the \(i^{th}\) sample to its \(k^{th}\) neighbour.