From 896e861893b67b2758afcc085092d73d21b0c3ef Mon Sep 17 00:00:00 2001 From: Kit Gallagher Date: Thu, 14 Nov 2024 15:21:26 -0500 Subject: [PATCH] Github markdown support for readme --- README.md | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 86f555c..55cf720 100644 --- a/README.md +++ b/README.md @@ -3,24 +3,20 @@ [![codecov](https://codecov.io/gh/SABS-R3-Epidemiology/seirmo/branch/main/graph/badge.svg?token=D1P3CMQTDP)](https://codecov.io/gh/SABS-R3-Epidemiology/seirmo) [![Documentation Status](https://readthedocs.org/projects/seirmo/badge/?version=latest)](https://seirmo.readthedocs.io/en/latest/?badge=latest) - - ## General Information -This program models the outbreak of an infectious disease with the SEIR model. The SEIR model is a compartmental model with four compartments: susceptible (S), exposed (but not yet infectious) (E), infectious (I), and recovered (R). Each individual is in one compartment at a time, and different rates quantify the movement of an individual from one compartment to another. -Two submodels are defined in the program: a deterministic SEIR model and a stochastic SEIR model. Both are non-spatial and are time dependant. When the population size is small, the emergent behaviour of the two systems (deterministic and stochastic) can significantly differ. When the population size is larger, the dynamics tend to better align. +This program models the outbreak of an infectious disease with the SEIR model. The SEIR model is a compartmental model with four compartments: susceptible (S), exposed (but not yet infectious) (E), infectious (I), and recovered (R). Each individual is in one compartment at a time, and different rates quantify the movement of an individual from one compartment to another. +Two submodels are defined in the program: a deterministic SEIR model and a stochastic SEIR model. Both are non-spatial and are time dependant. When the population size is small, the emergent behaviour of the two systems (deterministic and stochastic) can significantly differ. When the population size is larger, the dynamics tend to better align.   - - ## Deterministic SEIR + The deterministic model supposes that the population is large and well-mixed, and that small fluctuations in compartments do not impact the general solution. The conceptualisation of the model is illustrated below, and the parameters are described in a table below. ![SEIR model conceptualisation](./images/SEIR_model.png) - | Parameter | Description | Unit | | ------------- | --------------------------------------------------------------------------------------- | ---- | | β | Percentage of infectious and susceptible encounters per day that lead to transmission | 1/t | @@ -29,39 +25,40 @@ The deterministic model supposes that the population is large and well-mixed, an β > 0 controls the rate of tranmission, κ > 0 the rate at which exposed individuals become infectious, and γ > 0 the rate at which individuals recover. The model also requires initial conditions for each compartment: S(0), E(0), I(0), and R(0), which represent the initial number of people in each category. +The deterministic model solves this set of ODEs: -The deterministic model solves this set of ODEs: - - - - - +$$ +\frac{dS(t)}{dt} = - \beta S(t) I(t), \\\\ +\frac{dE(t)}{dt} = \beta S(t) I(t) - \kappa E(t), \\\\ +\frac{dI(t)}{dt} = \kappa E(t) - \gamma I(t), \\\\ +\frac{dR(t)}{dt} = \gamma I(t) +$$ The system of ODEs is nonlinear and must be solved by numerical integration methods. It is solved here using a forward model, using the `solve_ivp` method in the `scipy.integrate` library. -   - ## Stochastic SEIR + The stochastic model also supposes that the population is homogeneous, but it supposes that small fluctuations in compartments count toward the general solution. It models the population discretely and allows stochastic movements between compartments. The model can be illustrated as a set of chemical reactions: ![SEIR stochastic model reactions](./images/SEIR_stochastic_reactions.png) -The model is solved using the Gillespie algorithm (see documentation here: https://en.wikipedia.org/wiki/Gillespie_algorithm). The timesteps are sampled randomly. At each timestep, only one reaction takes place, and which reaction takes place is determined randomly following their propensities. For example, for a given time t, if the reaction occuring is a susceptible individual becoming exposed, then the following changes occur in the densities: - - - - +The model is solved using the Gillespie algorithm (see documentation [here](https://en.wikipedia.org/wiki/Gillespie_algorithm)). The timesteps are sampled randomly. At each timestep, only one reaction takes place, and which reaction takes place is determined randomly following their propensities. For example, for a given time _t_, if the reaction occuring is a susceptible individual becoming exposed, then the following changes occur in the densities: -where _(t+1)_ is the next timestep. +$$ +S(t + 1)=S(t) - 1, \\\\ +E(t + 1)=E(t) + 1 +$$ +where _(t+1)_ is the next timestep.   - ## Installation procedure + One way to install the module is to download the repositiory to your machine of choice and type the following commands in the terminal. + ```bash git clone https://github.com/SABS-R3-Epidemiology/seirmo.git cd ../path/to/the/file @@ -75,12 +72,14 @@ pip install -e .   -## Documentation +## Documentation + Some documentation on the program's classes and methods can be found here: https://seirmo.readthedocs.io/en/latest/ ### References + List of ressources that can be useful for the project: + * Gillespie D, 1977. Exact stochastic simulation of coupled chemical reactions (https://doi.org/10.1021/j100540a008) * Erban R, Chapman J and Maini P, 2007. A practical guide to stochastic simulations of reaction-diffusion processes (https://arxiv.org/abs/0704.1908) * Bauer F, 2008. Compartmental models in epidemiology (https://link.springer.com/chapter/10.1007/978-3-540-78911-6_2). -