BonachelaEntropyEstimator

BonachelaEntropyEstimator#

class infomeasure.estimators.entropy.BonachelaEntropyEstimator(*args, **kwargs)[source]

Bases: DiscreteHEstimator

Bonachela (Bonachela-Hinrichsen-Muñoz) entropy estimator for discrete data.

The Bonachela estimator computes the Shannon entropy using the formula from [BHM08]:

\[\hat{H}_{B} = \frac{1}{N+2} \sum_{i=1}^{K} \left( (n_i + 1) \sum_{j=n_i + 2}^{N+2} \frac{1}{j} \right)\]

where \(n_i\) are the counts for each unique value, \(K\) is the number of unique values, and \(N\) is the total number of observations.

This estimator is specially designed to provide a compromise between low bias and small statistical errors for short data series, particularly when the data sets are small and the probabilities are not close to zero.

Attributes:
*dataarray_like

The data used to estimate the entropy.