Skip to main content
`Ctrl`+`K`

# skbio.diversity.alpha.fisher_alpha

skbio.diversity.alpha.fisher_alpha(counts)

  Calculate Fisher’s alpha, a metric of diversity.

  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 taxa and \(N\) is the total number of individuals in the sample.

  Parameters:
    counts 1-D array_like, int

      Vector of counts.

  Returns:
    float

      Fisher’s alpha.

  Raises:
    RuntimeError

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

  Notes

  Fisher’s alpha is defined in [1].

  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 taxa are singletons. Alpha = +inf when all taxa are singletons.

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

  References

  [1]

  Fisher, R.A., Corbet, A.S. and Williams, C.B., 1943. The relation between the number of taxa and the number of individuals in a random sample of an animal population. The Journal of Animal Ecology, pp.42-58.