The extension modules, experimental codes, figure codes and application package for the paper titled "Validity of Markovian modeling for transient memory-dependent epidemic dynamics"[1]
Mi Feng1,2, Liang Tian1,3,*, Ying-Cheng Lai4,5, Changsong Zhou1,2,3,*
*Correspondence: [email protected], [email protected]
1Department of Physics, Hong Kong Baptist University, Kowloon Tong, Hong Kong SAR 999077, China
2Centre for Nonlinear Studies and Beijing-Hong Kong-Singapore Joint Centre for Nonlinear and Complex Systems (Hong Kong), Hong Kong Baptist University, Kowloon Tong, Hong Kong SAR 999077, China
3Institute of Computational and Theoretical Studies, Hong Kong Baptist University, Kowloon, Hong Kong SAR 999077, China
4School of Electrical, Computer and Energy Engineering, Arizona State University, Tempe, AZ 85287, USA
5Department of Physics, Arizona State University, Tempe, Arizona 85287, USA
The main text as well as the Supplementary Information can be downloaded through Link. And the main text in arXiv is available at arXiv. The latex version can be downloaded via source.
Within the "Dependencies" folder, you'll find the data dependencies and C++ code that generates the module for conducting Monte Carlo simulations of the stratified SIR spreading dynamics model. This module plays a crucial role in the experimental and data generation processes that follow.
The "ExperimentalCode" folder comprises the Python code responsible for generating all the experimental data presented in this paper.
The folder titled "DataCode" contains the Python code that is utilized to generate the figure data based on the experimental data presented in this paper.
Within the "FigureCode" folder, you will find the Python code responsible for extracting the valid figure data from the experimental data and plotting all the figures showcased in both the main text and supplementary information.
Figure data are available at FigureData.
we have developed two types of applications, namely a web-based and a Python version, to aid researchers in determining the generation time distribution, estimating the parameters of the Markovian dynamics in transient-state equivalence, and rectifying errors in
Readers can access the web-based application online. The source code for the web application can be found in the folder "./applications/Web-based_application".
Readers can run it through source code as follows:
- Download: The corresponding package could be downloaded via Python Application (5 KB, version 1.0).
- Installation: Extract the content of the enclosed Python_Application.zip file to a local directory.
- Run: Run the corresponding python script files named "Distribution.py" or "Rectification.py".
- Dependencies: numpy, scipy, and matplotlib.
This application demonstrates the diverse generation time distribution patterns resulting from various infection and removal time distributions, each with different parameters. Furthermore, it provides a user-friendly methodology to assess the potential underestimation or overestimation of memory-dependent epidemic dynamics through the implementation of Markovian modeling 1. Here, we offer a detailed description of each input parameter used in the app and further explanation of the results.
In epidemic dynamics, the infectivity of an infected individual can be characterized by the infection time distribution, denoted as
In "Distribution.py", we visualize the infection and removal time distributions,
The basic reproduction number
The user has the flexibility to adjust the following input parameters in the application:
- Time Point Number: this parameter determines the number of time points in each figure. It allows the user to control the level of detail in the visual representation;
- Time Step: by adjusting the time step, the user can determine the calculation accuracy and define the total time duration covered by the data;
- Distribution Form: the application offers three distribution forms for modeling infection and removal times: Weibull, gamma, and log-normal;
- Parameters (
$\alpha_{\mathrm{inf}}$ ,$\beta_{\mathrm{inf}}$ ) and ($\alpha_{\mathrm{rem}}$ ,$\beta_{\mathrm{rem}}$ ): the subscripts "inf" and "rem" correspond to the parameters of the infection and removal time distributions, respectively;$\alpha$ and$\beta$ represent different parameters in the time distributions; - Maximum Eigenvalue
$\Lambda_{\mathrm{max}}$ . For Weibull distribution, it follows:$$\psi(\tau) = \frac{\alpha}{\beta}(\frac{\tau}{\beta})^{\alpha-1}e^{(\frac{\tau}{\beta})^{\alpha}}.$$ For gamma distribution, it follows:$$\psi(\tau) = \frac{1}{\Gamma(\alpha)\beta^\alpha}\tau^{\alpha-1}e^{-\frac{\tau}{\beta}}.$$ where$\Gamma(\cdot)$ denotes gamma function. For log-normal distribution, it follow:$$\psi(\tau) = \frac{1}{\tau\beta\sqrt{2\pi}}\exp(-\frac{(\ln\tau - \alpha)^2}{2\beta^2}).$$
In "Rectification.py", we utilize the average generation and removal times from memory-dependent epidemic dynamics to adjust the estimations of various metrics derived from Markovian modeling. These metrics include the basic reproduction number, steady-state infected fraction of each age group, and total steady-state infected fraction.
To compute the steady state using
In the figure, the first row displays the contact matrix, age distribution, and initial infected fraction respectively.
The second row illustrates the comparison between the Markovian estimation and the rectification results for
Based on Eq. (15), the rectified
- Feng, M., Tian, L., Lai, Y.-C. & Zhou, C. Validity of Markovian modeling for transient memory-dependent epidemic dynamics. arXiv:2306.16864 (2023).
- Prem, K., Cook, A. R. & Jit, M. Projecting social contact matrices in 152 countries using contact surveys and demographic data. PLoS Comput. Biol. 13, e1005697 (2017).
- United Nations, Department of Economic and Social Affairs, Population Division. World population prospects 2019 (2021). Accessed on 29 June 2021.