hoi.core.entropy_knn — HOI 0.0.5 documentation (original) (raw)
hoi.core.entropy_knn#
hoi.core.entropy_knn(x, k: int = 3) → array[source]#
Entropy using the k-nearest neighbor.
Original code: blakeaw/Python-knn-entropyand references. See also Kraskov et al., Estimating mutual information, Phy rev, 2004
Parameters:
xarray_like
Input data of shape (n_features, n_samples)
knnint | 1
K-th closest point. Default is 1 (closest point)
Returns:
hxfloat
Entropy of x (in bits)