Skip to main content

Dynamod - a tool for modelling infectious diseases

Dynamod is a tool written in Python to build and run compartmental models in epidemiology.

In Dynamod, the model is represented in a formal model description language. This model file is both human-readable and machine-readable. It can be used to explain and discuss the model, while at the same time it is the direct input to the calculation of the model results without any further programming necessary (see the User Guide for reference).

Dynamod represents compartments as a multi-dimensional combination of attributes (e.g. age, risk group, state of infection, state of vaccination etc.). Initial shares and state transitions along these attribute axes can be modelled as dependent on other attributes.

Transitions can be described in two ways: either by the rate of change at each step of the iteration (leading to a differential equation), or by specifying the distribution of the transition time. This reflects the epidemiological reality better than a purely differential approach. For example, in the SEIR model it is rather sensible that in a well-mixed population the transition S -> E is differential (depending on the shares of S and I), whereas the transitions E -> I and I -> R likely behave differently, maybe following a normal distribution centered around the mean latency and recovery period, respectively. If modelled as differential transitions, a completely different probability distribution of latency and recovery periods would result. That follows, because the holding time in a differential transition (homogeneous Poisson process) follows an exponential distribution.

Iteration steps can be arbitrary amounts of time, this is just an interpretation of the time axis. Differential transitions are described "per tick" and time distributions also correspond to this unit of time.

Dynamod offers the concept of extending models, so more complex models can be built upon existing and proven base models, without changing the base models themselves. Using this approach, multiple models sharing the same basis can be run against each other, for example to study the effects of different alternative interventions.

To enable model extension, Dynamod works with named objects. Any named object defined in an extension model will replace the object with that name in the base model (or added if no such object exists). All core elements of the model (attributes, progressions, parameters, formulas and results) are named objects.

If the standard means of model description are not sufficient (or too cumbersome), Dynamod can be transparently extended by inserting arbitrary Python objects into Dynamod's namespace and invoking functions on these objects.

An automated parameter fitting algorithm finds values for a given set of parameters that (at least locally) minimizes the difference between a set of results and their respective expected outcomes. As target, series of result values can be specified as well as time and/or value of time series maxima and minima.

The parameter fitting utilizes gradient descent with grid search, integral parameter support and auto-adaptive learning rate. For details see python package "gradescent".

Metadata

Release files for dynamod 0.9.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dynamod 0.9.8
File Size Uploaded Provenance Actions
dynamod-0.9.8.tar.gz 77.3 kB Without provenance Details for dynamod-0.9.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dynamod 0.9.8
File Interpreter ABI Platform Actions
dynamod-0.9.8-py3-none-any.whl Python 3 none any Details for dynamod-0.9.8-py3-none-any.whl

Total release size: 152.1 kB

Release files / dynamod-0.9.8.tar.gz

Download URL dynamod-0.9.8.tar.gz
Size 77.3 kB
Tags Source
SHA-256 checksum
How to use checksums
234f2d7644b78fdfc45210c3ef489ed5f2a303912a73aa7da960d6f0b844f2a1
BLAKE2b-256 checksum
How to use checksums
405afa61731430d605cba9e49bc9cf4758c5f7ec1fad2a350e37125740220fab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / dynamod-0.9.8-py3-none-any.whl

Download URL dynamod-0.9.8-py3-none-any.whl
Size 74.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d0e089760ebb130151a42b54970cf8d2c8f2d920365d315fcb817182b51e8cb
BLAKE2b-256 checksum
How to use checksums
652d133eff40777f121b3f27cd2dec9f9a8dd61f5a66244026dc51cbd8ea6223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Security for dynamod 0.9.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page