Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bnb32/corona_modeling
Compartmental epidemiology models for COVID
https://github.com/bnb32/corona_modeling
compartmental-models covid-19
Last synced: about 2 months ago
JSON representation
Compartmental epidemiology models for COVID
- Host: GitHub
- URL: https://github.com/bnb32/corona_modeling
- Owner: bnb32
- License: mit
- Created: 2021-08-17T04:08:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-01T17:48:17.000Z (over 2 years ago)
- Last Synced: 2024-10-14T03:07:03.872Z (3 months ago)
- Topics: compartmental-models, covid-19
- Language: Python
- Homepage:
- Size: 2.78 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
***********************
COVID Modeling Overview
***********************Documentation
=============
``_Installation
============Follow instructions `here `_
Usage
=====Instantiate model:
.. code-block:: python
from covid.models import SIR
model = SIR()Instantiate dataset:
.. code-block:: python
from covid.fetch import Dataset
ds = Dataset({'state': , 'n_days': })Get data:
.. code-block:: python
data = ds.get_data()
Fit model parameters:
.. code-block:: python
model.fit_parameters_from_data(data)
Run model:
.. code-block:: python
model.initialize({k: data[k][0] for k in model.compartment_names})
output = model.run_model(n_days=)Plot output of specific compartment:
.. code-block:: python
from covid.postprocessing import plot_compartment
plot_compartment(sim_data=output, raw_data=data, params=ds.params, compartment=)Change model parameters:
.. code-block:: python
model.update_parameters()