https://github.com/adityalab/epifnp
Official repo to paper
https://github.com/adityalab/epifnp
epidemiology functional-neural-processes neural-processes pytorch uncertainty-quantification
Last synced: 28 days ago
JSON representation
Official repo to paper
- Host: GitHub
- URL: https://github.com/adityalab/epifnp
- Owner: AdityaLab
- License: mit
- Created: 2021-06-04T17:35:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-15T22:37:28.000Z (over 2 years ago)
- Last Synced: 2025-04-02T23:51:32.044Z (29 days ago)
- Topics: epidemiology, functional-neural-processes, neural-processes, pytorch, uncertainty-quantification
- Language: Python
- Homepage:
- Size: 931 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# When in Doubt: Neural Non-Parametric Uncertainty Quantification for Epidemic Forecasting
**Paper Link:** https://arxiv.org/abs/2106.03904
## Setup
First install Anaconda. The dependencies are listed in `environment.yml` file. Make sure you make changes to version of `cudatoolkit` if applicable.
Then run the following commands:
```bash
conda env create --prefix ./envs/epifnp --file environment.yml
source activate ./envs/epifnp
```## Directory structure
```
-data
- ILINet.csv -> wILI values for seasons 2003 to 2020 collected from flusight
- model_chkp -> stores intermediate model parameters while training
- models/fnpmodels.py -> implementation of EpiFNP modules
- plots -> plots of predictions
- saves -> saves predictions for models as pkl files
- train_ili.py -> training script for EpiFNP
- test_ili.py -> inference of trained model
- test_regress.py -> Autoregressive inference using a trained model
```## Training
Run:
```
python train_ili.py -y -w -a trans -n -e
```Or run `run.py` to run all experiments.
Prediction plots will be saved in `plots/Test.png` and model in `model_chkp` folder.
## Inference
Run:
```bash
python test_ili.py -y -w -a trans -n
```for normal inference.
Run:
```bash
python test_regress_ili.py -y -w -a trans -n
```for auto-regressive inference. Note: Train and use a 1 week ahead model for AR inference.
The predictions and plots are saved in `saves` and `plots` respectively.