skbio.diversity.alpha.tsallis#

skbio.diversity.alpha.tsallis(counts, order=2)[source]#

Calculate Tsallis entropy.

Tsallis entropy (\(^qH\)), a.k.a. HCDT entropy, is a generalization of Boltzmann-Gibbs entropy with an exponent (order) \(q\). It is defined as:

\[^qH = \frac{1}{q - 1}(1 - \sum_{i=1}^S p_i^q)\]

where \(S\) is the number of taxa and \(p_i\) is the proportion of the sample represented by taxon \(i\).

Parameters:
counts1-D array_like, int

Vector of counts.

orderint or float, optional

Order (\(q\)). Ranges between 0 and infinity. Default is 2.

Returns:
float

Tsallis entropy.

Notes

Tsallis entropy was originally defined in [1]. Special cases of Tsallis entropy given order \(q\) include:

  • \(q=0\): Observed species richness (\(S_{obs}\)) minus 1.

  • \(q \to 1\): Shannon index \(H'\).

  • \(q=2\): Simpson diversity index (\(1 - D\)).

  • \(q \to \infty\): 0.

References

[1]

Tsallis, C. (1988). Possible generalization of Boltzmann-Gibbs statistics. Journal of statistical physics, 52, 479-487.