ShannonIndex
ShannonIndex, commonly called the Shannon diversity index, is a metric used to quantify biodiversity in ecological communities and, by extension, in information theory. It measures the uncertainty in predicting the species identity of a randomly chosen individual from a community, reflecting both species richness and evenness.
The index is computed as H' = - sum_{i=1}^S p_i log p_i, where S is the number of species
ShannonIndex is widely used to compare biodiversity across sites, treatments, or time, in ecology and microbiology.
Interpretation caveats: H' is sensitive to sample size and the presence of rare species; under-sampling can