lnn_entropy {rmi}R Documentation

Local Nearest Neighbor (LNN) Entropy Estimator

Description

Local Nearest Neighbor entropy estimator using Gaussian kernel and kNN selected bandwidth. Entropy is estimated by taking a Monte Carlo estimate using local kernel density estimate of the negative-log density.

Usage

lnn_entropy(data, k = 5, tr = 30, bw = NULL)

Arguments

data

Matrix of sample observations, each row is an observation.

k

Order of the local kNN bandwidth selection.

tr

Order of truncation (number of neighbors to include in entropy).

bw

Bandwidth (optional) manually fix bandwidth instead of using local kNN bandwidth selection.

References

Loader, C. (1999). Local regression and likelihood. Springer Science & Business Media.

Gao, W., Oh, S., & Viswanath, P. (2017). Density functional estimators with k-nearest neighbor bandwidths. IEEE International Symposium on Information Theory - Proceedings, 1, 1351–1355.

Examples

set.seed(123)
x <- rnorm(1000)
print(lnn_entropy(x))
#analytic entropy
print(0.5*log(2*pi*exp(1)))


[Package rmi version 0.1.1 Index]