some correlation, even with replicates
@@ -10,7 +10,9 @@ import sciris as sc
sims = sc.objdict()
-popsizes = [10e3, 20e3, 30e3, 40e3, 50e3, 75e3, 100e3, 125e3, 150e3, 200e3, 300e3, 400e3, 500e3]
+popsizes = [1e3, 2e3, 5e3, 10e3, 20e3, 30e3, 40e3, 50e3, 75e3, 100e3]
+popsizes += [p+1e3 for p in popsizes]
+popsizes += [p+2e3 for p in popsizes]
results = []
keys = []
@@ -20,7 +22,7 @@ for p,psize in enumerate(popsizes):
keys.append(key)
sims[key] = cv.Sim(pop_size=psize,
n_days=30,
- rand_seed=3059,#, 29837*(p+298),
+ rand_seed=2585+p,#, 29837*(p+298),
pop_type = 'random',
verbose=0,
)
@@ -30,7 +32,7 @@ for p,psize in enumerate(popsizes):
#%% Plotting
-pl.figure(dpi=200)
+pl.figure(figsize=(12,6), dpi=200)
# pl.rcParams['font.size'] = 18
pl.subplot(1,3,1)
@@ -60,3 +62,5 @@ pl.scatter(popsizes, fres, s=150, c=colors)
pl.title('Correlation')
pl.xlabel('Population size')
pl.ylabel('Number of infections')
+
+print(pl.corrcoef(popsizes, fres))
\ No newline at end of file
