Skip to content

Commit

Permalink
Added text to Overview doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomasini committed Jul 11, 2024
1 parent b77b084 commit ff6abd3
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/source/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,28 @@ Metapypulation is a package to simulate the spread of culture in a metapopulatio

## Structure

Metapypulation has three main classes:
Metapypulation has three main classes:

- an `Individual` class, which represents each individual in the metapopulation.
- a `Subpopulation` class, representing the different discrete subpopulations that compose the metapopulation;
- finally, a `Metapopulation` class, which puts `Individual` and `Subpopulation` together and have individuals interacting in this world.

## Cultural traits

Currently, each individual's culture is represented by a set of $N$ features. Each feature in turn can assume one of $\nu$ traits. These features represent different (assumed) independent facets of culture: one could be language, burial tradition, boat building features, *etc*. So each individual is currently represented by a vector of integers.

### Axelrod model

While we plan on adding several different ways for individuals to interact and change their traits, as of July 2024 the only such way to interact is shaped upon the **Axelrod model of culture dissemination**. In this model, at each generation an individual is chosen at random to copy a trait from a neighboring source on a lattice; the copy occurs with a probability proportional to the total similarity of the two random individuals. This mimicks homophily - the principle by which two individuals that resemble each other have a higher chance of having an exchange than two individuals that are completely different. In the metapopulation model that I developed, for each subpopulation we pick two random individuals that will act as target and source of the copy.

### Diversity measures

Currently, there are two diversity measures implemented at the level of both the subpopulation and the whole metapopulation. The first is the Shannon diversity index, which for each feature is measured as

$$ H^{\prime} = - \sum_{i = 1}^{\nu} p_i \ln p_i , $$

where $p_i$ is the frequency of trait $i$ in the subpopulation / metapopulation. Then, the Shannon diversity index that we measure is the average of the index for each trait,

$$ \bar{H} = H^{\prime} .$$

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)`.

0 comments on commit ff6abd3

Please sign in to comment.