Skip to content

Commit ec9dac9

Browse files
committed
Added Simpson to documentation
1 parent 00efe7c commit ec9dac9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/source/overview.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,11 @@ where {math}`p_i` is the frequency of trait {math}`i` in the subpopulation / met
3838
\bar{H} = H^{\prime} .
3939
```
4040

41-
The second diversity measure that we calculate is the number of unique sets of traits. This is done through the function `np.unique(..., return_counts = True)`.
41+
The second diversity measure that we calculate is the number of unique sets of traits, {math}`K`. In code, this is done through the function `np.unique(..., return_counts = True)`.
42+
We also implemented Simpson's diversity index, defined as
43+
44+
```{math}
45+
S = \frac{N(N-1)}{\sum_{k}n_k(n_k-1)} ,
46+
```
47+
48+
where {math}`n_k` is the number of individuals with the set of traits {math}`k`. This is implemented both at the level of the subpopulation and of the metapopulation.

0 commit comments

Comments
 (0)