Skip to content

Commit de3c0d9

Browse files
committed
tutorials continued
1 parent fdd469d commit de3c0d9

1 file changed

Lines changed: 67 additions & 3 deletions

File tree

docs/source/getting_started.rst

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ MEmilio benefits from a harmonized description of its models in infection states
7171
:alt: MEmilio's uniform model description.
7272
:width: 100%
7373

74-
Below we guide you through several tutorials on using MEmilio's models through its Python interface. More experience users might directly start with the `Python exercises <https://github.com/SciCompMod/memilio-tutorials/tree/main/exercises>`_ which are derived versions from the tutorials or with `tutorial and exercises in C++ <https://github.com/SciCompMod/memilio-tutorials/tree/main/cpp-tutorials>`_. For more advanced aggregated models using the Linear Chain Trick or IDE-formulations, we currently only provided tutorials and exercises in C++. For the individual- or agent-based model (ABM), we currently only provide `ABM tutorials in C++ <
75-
https://github.com/SciCompMod/memilio-tutorials/tree/main/cpp-tutorials/abm>`_.
74+
Below we guide you through several tutorials on using MEmilio's models through its Python interface. More experience users might directly start with the `Python exercises <https://github.com/SciCompMod/memilio-tutorials/tree/main/exercises>`_ which are derived versions from the tutorials or with `tutorial and exercises in C++ <https://github.com/SciCompMod/memilio-tutorials/tree/main/cpp-tutorials>`_. For more advanced aggregated models using the Linear Chain Trick or IDE-formulations, we currently only provided tutorials and exercises in C++. For the individual- or agent-based model (ABM), we currently only provide `ABM tutorials in C++ <https://github.com/SciCompMod/memilio-tutorials/tree/main/cpp-tutorials/abm>`_.
7675

7776

7877
Simple compartmental models
@@ -90,27 +89,92 @@ In `Tutorial 01 <https://github.com/SciCompMod/memilio-tutorials/blob/main/tutor
9089
Flows between compartments
9190
**************************
9291

93-
**FlowModel**: Inherits from CompartmentalModel and extends it with the concept of flows between compartments. Instead of directly defining derivatives, it specifies the flows between compartments.
92+
Often, modelers might be interested not only in the estimated number of individuals in a state of the disease but also on the number of recent or current transitions between different states such as the number of new hospitalizations. As modelers could introduce additional compartments only following those transitions or do complex post-processing, MEmilio directly computes all transitions between compartments by default. This is realized through MEmilio's **FlowModel** structure which is a still generic but refined specification of the **CompartmentalModel**. Through an optimized backend, the overhead for computing transitions (i.e. flows) and compartmental values is less than 10 %.
93+
94+
In `Tutorial 02 <https://github.com/SciCompMod/memilio-tutorials/blob/main/tutorial02.py>`_, we show how to obtain the numbers of newly symptomatic and hospitalized individuals for our :doc:`ODE-SECIR model <models/osecir>`. The result of the tutorial is the following figure.
95+
96+
.. image:: http://martinkuehn.eu/research/images/tutorial02.png
97+
:alt: Newly symptomatic and hospitalized individuals as obtained from Tutorial 02.
98+
:width: 100%
9499

95100

96101
Demography and contact structures
97102
*********************************
98103

104+
.. image:: http://martinkuehn.eu/research/images/contacts.png
105+
:alt: Module for flexible demographic stratification by age groups.
106+
:width: 100%
99107

108+
.. image:: http://martinkuehn.eu/research/images/tutorial05.png
109+
:alt: Different epidemic curves for six different age groups.
110+
:width: 100%
100111

101112

102113
Metapopulation and mobility
103114
***************************
104115

116+
.. image:: http://martinkuehn.eu/research/images/mobility.png
117+
:alt: Module for flexible spatial resolution in metapopulation models.
118+
:width: 100%
105119

120+
.. image:: http://martinkuehn.eu/research/images/tutorial07.png
121+
:alt: Delayed epidemic spreading through metapopulation coupling of two regions.
122+
:width: 100%
106123

107124
Fixed time-point interventions
108125
******************************
109126

127+
.. image:: http://martinkuehn.eu/research/images/tutorial03.png
128+
:alt: Changed epidemic outcome through interventions at fixed time points.
129+
:width: 100%
130+
131+
132+
Location-specific interventions
133+
*******************************
134+
135+
.. image:: http://martinkuehn.eu/research/images/tutorial10.png
136+
:alt: Changed epidemic outcome through interventions at specific locations.
137+
:width: 100%
110138

111139
Dynamic interventions
112140
*********************
113141

142+
.. image:: http://martinkuehn.eu/research/images/tutorial11.png
143+
:alt: Changed epidemic outcome through dynamically activated interventions.
144+
:width: 100%
145+
146+
Fitting MEmilio's models
147+
************************
148+
149+
As parameter inference is a research topic of its own, MEmilio does not provide methods for parameter inference but instead provides well designed interfaces to established tools and packages dedicated to model calibration and parameter inference.
150+
151+
`Tutorial 04 <https://github.com/SciCompMod/memilio-tutorials/blob/main/tutorial04.py>`_ and `Tutorial 06 <https://github.com/SciCompMod/memilio-tutorials/blob/main/tutorial06.py>`_, we introduce usage of Approximate Bayesian Computation (ABC) with MEmilio and `pyABC <https://pyabc.readthedocs.io/en/latest/>`_ for likelihood-free inference.
152+
153+
.. image:: http://martinkuehn.eu/research/images/tutorial04.png
154+
:alt: Projections of the calibrated model using pyABC.
155+
:width: 100%
156+
157+
.. image:: http://martinkuehn.eu/research/images/tutorial06.png
158+
:alt: Posterior distributions for the model parameters using pyABC.
159+
:width: 100%
160+
161+
In `Tutorial 09 <https://github.com/SciCompMod/memilio-tutorials/blob/main/tutorial09.py>`_ we use `Bayesflow <https://bayesflow.org/main/index.html>`_, a state of the art python library for Bayesian inference with deep learning.
162+
163+
.. image:: http://martinkuehn.eu/research/images/tutorial09.png
164+
:alt: Posterior distributions for the model parameters using BayesFlow.
165+
:width: 100%
166+
167+
Linear Chain Trick
168+
*******************
169+
170+
171+
IDE-based models
172+
*****************
173+
174+
175+
Agent-based model
176+
*****************
177+
114178

115179
Download and installation
116180
-------------------------

0 commit comments

Comments
 (0)