aryagraph.sim.ensemble.EnsembleResult#

class aryagraph.sim.ensemble.EnsembleResult(times: ndarray, states: list[str], roles: dict[str, str], samples: ndarray, mean: dict[str, ndarray], std: dict[str, ndarray], quantiles: dict[str, dict[float, ndarray]], final_sizes: dict[str, ndarray], runs: int, n_nodes: int, model: str, params: dict, seed: int | None, seeds: list[int], results: list[SimulationResult] | None = None)[source]#

Bases: object

Counts of each state across runs, on a common time grid.

Variables:
  • times (numpy.ndarray) – (P,) common grid, linspace(0, longest run, n_points).

  • samples (numpy.ndarray) – (runs, P, S) count of nodes in each state for every run.

  • mean (dict[str, numpy.ndarray]) – {state: (P,) array} holding the mean count of nodes in each state over the runs, at every grid time.

  • std (dict[str, numpy.ndarray]) – {state: (P,) array} holding the standard deviation of that count over the runs; std uses ddof=1 (0 for a single run).

  • quantiles (dict[str, dict[float, numpy.ndarray]]) – {state: {q: (P,) array}} for each requested percentile q.

  • final_sizes (dict[str, numpy.ndarray]) – {state: (runs,) int array} holding each run’s count at its last frame.

  • seeds (list[int]) – The integer seed of every run: fn(..., seed=seeds[i]) replays run i.

  • results (list[aryagraph.sim.base.SimulationResult] | None) – The individual results when keep=True, else None.

fractions() → dict[str, ndarray][source]#

Mean share of nodes in each state over the grid.

band(state: str, lo: float = 5, hi: float = 95) → tuple[ndarray, ndarray][source]#

Lower and upper quantile curves of state (both must have been requested).

plot(**kwargs: Any)[source]#

Mean curves with quantile bands; see aryagraph.charts.sim.plot_ensemble().