In [1]:
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')

In [ ]:


In [2]:
%matplotlib inline

In [3]:
run simulate_data.py


Running simulate_data.py

Simulation Configuration Settings.

Iterations:	101
Population:	100

+-------------+------------+
| Category    | Population | 
+-------------+------------+
| Susceptible | 40	   |
| Infective   | 40	   |
| Removes     | 20	   |
| Dead        | 0	   |
+-------------+------------+

Walk speed:	0.01
Contagion ball:	100000.0
Sample sims:	20

Model Parameters:

+------------------------+--------+
| Parameter              | Value  |
+------------------------+--------+
| Infection propensity   | 0.0200 |
| Recovery propensity    | 0.1000 |
| Immunization threshold | 0.0000 |
| Relapse threshold      | 0.0000 |
| Fatality propensity    | 0.0000 |
+------------------------+--------+
Attempting to import the Seaborn module... success.
Simulation... done.
Saving data... done.

In [7]:
monte_carlo = np.load('simulation_data.npy')
dynamical = np.loadtxt('poplevels.csv',dtype=np.double,delimiter=',')

In [8]:
mean_mc = np.mean(monte_carlo,axis=2)

In [9]:
for i in range(3):
    plt.plot(dynamical[:,i],label=labels[i],color=colors[i])
    plt.plot(mean_mc[:,i], label=labels[i], color=colors[i])

plt.legend()


Out[9]:
<matplotlib.legend.Legend at 0x7f11078e5438>
$$ f' = \alpha f \cdot s $$

In [ ]: