In [1]:
import numpy as np
import matplotlib.pyplot as plt

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:	4.0
Sample sims:	100

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.
Saving plot... done.

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

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

In [6]:
plt.plot(dynamical)
plt.plot(mean_mc)


Out[6]:
[<matplotlib.lines.Line2D at 0x7f4693107048>,
 <matplotlib.lines.Line2D at 0x7f46928f9358>,
 <matplotlib.lines.Line2D at 0x7f46928f91d0>,
 <matplotlib.lines.Line2D at 0x7f46928f9320>]