Fork me on GitHub"

# skbio.diversity.alpha.simpson

`skbio.diversity.alpha.``simpson`(counts)

  Calculate Simpson’s index.

  State: Experimental as of 0.4.0.

  Simpson’s index is defined as `1 - dominance`:

  \[1 - \sum{p_i^2}\]

  where \(p_i\) is the proportion of the community represented by OTU \(i\).

  Parameters:

  counts : 1-D array_like, int

  > Vector of counts.

  Returns:

  double

  > Simpson’s index.

  See also

  `dominance`

  Notes

  The implementation here is `1 - dominance` as described in [R9596]. Other references (such as [R9696]) define Simpson’s index as `1 / dominance`.

  References

  [R9596] | (1, 2) http://folk.uio.no/ohammer/past/diversity.html

  [R9696] | (1, 2) http://www.pisces-conservation.com/sdrhelp/index.html