epykalman
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: hwunrow
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 245 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
epykalman
This repository contains the code and data used to generate the results and figures presented in "Data assimilation for estimating time-varying reproduction numbers" by Wunrow et al. (2024).
The manuscript compares five methods to estimate the time-varying basic reproduction number, $R0(t)$, from synthetic data generated by a stochastic SIR model. We compare the Ensemble Adjustment Kalman Filter (EAKF) with no inflation, fixed inflation, and adaptive inflation, the Ensemble Square Root Smoother (EnSRS) with adaptive inflation, and the EpiEstim renewal equation approach. Our results demonstrate that the EAKF and EnSRS methods with adaptive inflation outperform other approaches in accurately capturing the true $R0(t)$, particularly in scenarios with more abrupt changes in transmission rates.The code provided here allows for the reproduction of the experiments and analysis detailed in the paper.
Installation
To set up the necessary environment, use conda:
bash
conda env create -f environment.yml
Then, install the epykalman package:
pip install -e .
Directory Tree Structure
epykalman/
│
├── src/epykalman/
| ├── eakf/ # EAKF, EnSRS, and adaptive inflation scripts
| ├── epiestim/ # Epiestim parallelized scripts
| ├── utils/ # Helper functions for performance metrics
| ├── params/good_param_list.csv # Parameter values for all 47,871 scenarios
│ └── plot/ # Plotting code for all tables and figures
│
├── setup.py # Setup file
├── environment.yml # List of Python dependencies for conda
├── .flake8 # flake8 codestyle
└── README.md # Project README file with an overview and setup instructions
Usage
To reproduce all figures and tables run the following Jupyter notebook
src/epykalman/plot/create_plots.ipynb
Simulate Data
``` from epykalman import simulate_data
params = { 'rt0': 1.3, 'rt1': 4.1, 'midpoint': 190., 'k': 0.1, 'nt': 365, 'tI': 4., 'N': 100000., 'S0': 99900., 'I0': 100., }
np.random.seed(1994)
data = simulatedata.simulatedata(**trueparams, addnoise=True, noiseparam=1/50)
data.plotall()
```

Run EAKF with adaptive inflation
``` from epykalman import model_da from epykalman import eakf
from numpy.random import uniform
prior = { 'beta':{ 'dist': uniform, 'args':{ 'low': 0.1, 'high': 2., } }, 't_I':{ 'dist': "constant", # 'args':{ # 'lower': 1., # 'upper': 12., # } }, }
model = modelda.SIRmodel(data)
kf.filter(prior, infmethod="adaptive")
kf.plotposterior()
```

Contributing
Contributions to this repository are welcome. Please feel free to open issues for bug reports or feature requests. If you would like to contribute code, please fork the repository and submit a pull request.
Owner
- Name: Han Yong Wunrow
- Login: hwunrow
- Kind: user
- Location: New York, NY
- Company: Columbia University
- Website: hwunrow.github.io
- Repositories: 2
- Profile: https://github.com/hwunrow
(he/him pronouns) Applied Math Ph.D. student at Columbia APAM
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: epyfilter
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Han Yong
family-names: Wunrow
affiliation: Columbia University
email: nhw2114@columbia.edu
orcid: 'https://orcid.org/0009-0000-6592-2987'
repository-code: 'https://github.com/hwunrow/epyfilter'
license: MIT
GitHub Events
Total
- Push event: 3
Last Year
- Push event: 3
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- matplotlib *
- numpy *
- pandas *
- scipy *
- colorama ==0.4.6
- comm ==0.2.2
- contourpy ==1.1.1
- cycler ==0.12.1
- fonttools ==4.43.1
- gitdb ==4.0.11
- gitpython ==3.1.41
- ipywidgets ==8.1.2
- joypy ==0.2.6
- jupyter-server-mathjax ==0.2.6
- jupyterlab-widgets ==3.0.10
- kiwisolver ==1.4.5
- matplotlib ==3.8.0
- nbdime ==4.0.1
- networkx ==3.2.1
- packaging ==23.2
- pillow ==10.1.0
- pyparsing ==3.1.1
- pypdf ==3.17.0
- pywavelets ==1.4.1
- scipy ==1.11.3
- seaborn ==0.13.2
- smmap ==5.0.1
- widgetsnbextension ==4.0.10