File: geting_started.rst

package info (click to toggle)
python-epimodels 0.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 268 kB
  • sloc: python: 821; makefile: 24; sh: 14
file content (34 lines) | stat: -rw-r--r-- 824 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Getting Started
===============

Epimodels offers a variety of deterministic models pre-implemented for Infectious disease modeling.
These models are split into `discrete` (based of difference equations) and `continuous` (based on Ordinary differential equations).

The APIs exposed for both families of models is identical to facilitate use.


Continuous models
-----------------

.. code-block:: python

   import epimodels.continuous.models as CM
   model = CM.SIR()
   model([1000, 1, 0], [0, 50], 1001, {'beta': 2, 'gamma': .1})
   model.plot_traces()

.. image:: _static/cSIR.png

Discrete models
---------------

.. code-block:: python

   import epimodels.discrete.models as DM
   model = DM.SIR()
   model(([1000, 1, 0], [0,50], 1001, {'beta': 2, 'gamma': 1}))
   model.plot_traces()

.. image:: _static/dSIR.png