Skip to content

Commit 65e216e

Browse files
committed
added currenlty colllected metrics
1 parent 51e18a2 commit 65e216e

2 files changed

Lines changed: 174 additions & 11 deletions

File tree

docs/experiments.md

Lines changed: 172 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,175 @@ These phases should be completed sequentially, deepening our understanding at ea
2222
- Create autocorrelation plot of mean population count, following perturbations around the critical point
2323
- Look for critical slowing down: perturbations to states closer to the critical point should more slowly return to the steady state
2424
### Phase 4: model extensions
25-
- Investigate whether hydra effect and SOC still occur with diffusion and directed movement
25+
- Investigate whether hydra effect and SOC still occur with diffusion and directed movement
26+
27+
---
28+
29+
30+
## What we are currently collecting:
31+
32+
### 2D Parameter Sweep
33+
34+
We map the full phase space to find:
35+
- Hydra regions
36+
- Critical points
37+
- Coexistence boundaries
38+
- Evolutionary advantage zones
39+
40+
For now at least we sweep:
41+
42+
```
43+
prey_birth in [0.10, 0.35]
44+
prey_death in [0.001, 0.10]
45+
```
46+
47+
Metrics Collected (so far):
48+
49+
1. Population Dynamics
50+
51+
```
52+
53+
prey_mean: time-averaged prey pop
54+
prey_std: variability in prey
55+
56+
# same for predator as above
57+
58+
prey_survived: did prey persist
59+
pred_survived: did pred perist
60+
61+
```
62+
63+
2. Cluster structure
64+
65+
```
66+
67+
prey_n_clusters: total number of prey clusters
68+
pred_n_clusters: total number of pred clusters
69+
prey_tau: power law exp
70+
prey_s_c: cutoff cluster sizes
71+
pred_tau: pred cluster exp
72+
pred_s_c: pred cutoff
73+
74+
```
75+
76+
3. Order Parameters
77+
78+
```
79+
prey_largest_fraction_mean
80+
prey_largest_fraction_std
81+
pred_largest_fraction_mean
82+
prey_percolation_prob: fraction of samples with spanning cluster
83+
pred_percolation_prob: predator percolation prob
84+
85+
```
86+
87+
88+
4. Spatial Correlations
89+
90+
```
91+
92+
pcf_distances: distance bins in lattice units
93+
pcf_prey_prey_mean: prey-prey correlation function
94+
pcf_pred_pred_mean
95+
pcf_prey_pred_mean
96+
segregation_index: measure spatial mixing
97+
prey_clustering_index: short range prey clustering
98+
pred_clustering_index
99+
100+
```
101+
102+
5. Evolutionary dynamics
103+
104+
```
105+
evolved_prey_death_mean: time avg evolved mortality rate
106+
evolved_prey_death_std
107+
evolved_prey_death_final
108+
evolve_sd: mutation strength used
109+
110+
```
111+
112+
---
113+
114+
### Finite-size scaling
115+
116+
We choose a fixed point identified in the main simulation run ```(target_prey_birth, target_prey_death)``` ideally near hydra boundary.
117+
118+
119+
For selected grid sizes (TBD) we run independent reps for each size.
120+
121+
122+
Metrics:
123+
124+
```
125+
grid_size
126+
prey_mean, prey_std
127+
prey_survived: bool
128+
prey_largest_fraction: order parameter
129+
prey_percolation_prob
130+
prey_tau: grid size dependent exponent
131+
prey_tau_se: SE on tau
132+
prey_s_c: cutoff scales
133+
```
134+
135+
---
136+
137+
### Evo Sensitivity
138+
139+
How does mutation strength affect evolutionary advantage in Hydra regions, speed of adaptation and final evolved mortality rates.
140+
141+
Again. choose fixed point identified from main analysis.
142+
143+
Metrics Dict:
144+
145+
```
146+
prey_mean: in cell units as the below metrics as well
147+
prey_std
148+
pred_mean
149+
pred_std
150+
prey_survived: bool
151+
152+
+ same cluster metrics and spatial correlation metrics
153+
154+
155+
evolved_prey_death_mean: avg mortality across all prey
156+
evolved_prey_death_std
157+
evolved_prey_death_final
158+
evolve_sd
159+
```
160+
161+
162+
## Additions Required:
163+
164+
1. Temporal dynamics for time series analysis. Needed to add critical slowing down effect near phase transitions.
165+
166+
```
167+
result["prey_timeseries"] = prey_pops[::10] # Subsample every 10 steps
168+
result["pred_timeseries"] = pred_pops[::10]
169+
170+
```
171+
172+
```
173+
def run_perturbation_experiment(...):
174+
# Save full time series only for these special runs
175+
```
176+
177+
2. Snapshots of spatial configurations. This is a costly operation so we need to figure out how and when to do it in the sim.
178+
179+
3. Saving final grid states?
180+
181+
```
182+
result["final_grid"] = model.grid.copy()
183+
```
184+
185+
186+
187+
188+
189+
190+
191+
192+
193+
194+
195+
196+

docs/kimon_updates.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,11 @@ Options:
292292
2. Coarse initial parameter sweep grid
293293
3. Discard non-evo runs and use mean field baseline instead or the opposite
294294

295-
NOTE: Without the optimization kernels for a 1000x1000 grid the simulation (using 50 reps for statistical power) would run for 548 hours (approximately 23 days)
295+
NOTE:
296296

297-
### Results Dict
297+
Warmup and Measurement time must be scaled according to grid size. We need to write a method to estimate the approximate simulaiton time required. (Sary is working on that.)
298298

299-
Add clustering size index.
300-
Pertrubtion on the prey count.
301-
Cluster size distribution mesauremnt.
302299

303-
Sary:
304-
305-
Bifuraction
306-
Clustering Measurement
307-
Warmpup and Measurement size
308300

309301

310302

0 commit comments

Comments
 (0)