skbio.diversity.alpha.margalef¶
- skbio.diversity.alpha.margalef(counts)[source]¶
Calculate Margalef’s richness index.
State: Experimental as of 0.4.0.
Margalef’s D is defined as:
\[D = \frac{(S - 1)}{\ln N}\]where \(S\) is the number of OTUs and \(N\) is the total number of individuals in the sample.
Assumes log accumulation.
- Parameters:
counts (1-D array_like, int) – Vector of counts.
- Returns:
Margalef’s richness index.
- Return type:
double
Notes
Based on the description in [1].
References