Learning standard and Reactive SEIRD models to explain COVID-19 outbreaks.
src/models.pydefines the R-SEIRD and SEIRD dynamical systems.src/datautils.pydefines helper functions for loading data.scripts/ceem_run.pyis a script for fitting the SEIRD/R-SEIRD models to datascripts/plot_trajectories_train.pygenerates Figure 1 in the paper.scripts/plot_trajectories_test.pygenerates Figure 2 in the paper.scripts/eval_for_hist.pygenerates simulations Figure 3 in the paper.scripts/plot_comparison_hist.pygenerates Figure 3 in the paper.scripts/plot_reactionfun.pygenerates Figure 4 in the paper.
Clone CEEM and pip install the module.
git clone https://github.com/sisl/CEEM.git
cd CEEM
pip install -e .
cd ..
export PYTHONPATH=$(pwd):$PYTHONPATH
Install additional requirements
pip install -r requirements.txt
Run bash get_data.sh to download datasets.
Train the R-SEIRD model (takes ~16 minutes)
python scripts/ceem_run.py
cp ./data/reactive/ckpts/best_model.th ./trained_models/reactive.th
Train the SEIRD model (takes ~8 minutes)
python scripts/ceem_run.py -c 1
cp ./data/const/ckpts/best_model.th ./trained_models/const.th
python scripts/plot_trajectories_train.py
python scripts/plot_trajectories_test.py
python scripts/eval_for_hist.py
python scripts/eval_for_hist.py -c 1
python scripts/plot_comparison_hist.py
python scripts/plot_reactionfun.py