skbio.diversity.alpha.fisher_alpha

skbio.diversity.alpha.fisher_alpha(counts)[source]

Calculate Fisher’s alpha, a metric of diversity.

State: Experimental as of 0.4.0.

Fisher’s alpha is estimated by solving the following equation for \(\alpha\):

\[S=\alpha\ln(1+\frac{N}{\alpha})\]

where \(S\) is the number of OTUs and \(N\) is the total number of individuals in the sample.

Parameters:

counts (1-D array_like, int) – Vector of counts.

Returns:

Fisher’s alpha.

Return type:

double

Raises:

RuntimeError – If the optimizer fails to solve for Fisher’s alpha.

Notes

Fisher’s alpha is defined in [1]. See also [2].

There is no analytical solution to Fisher’s alpha. However, one can use optimization techniques to obtain a numeric solution. This function calls SciPy’s minimize_scalar to find alpha. It is deterministic. The result should be reasonably close to the true alpha.

Alpha can become large when most species are singletons. Alpha = +inf when all species are singletons.

When the community is empty (i.e., all counts are zero), alpha = 0.

References