pypomp.core.results.Result

class pypomp.core.results.Result(method: str, kind: str, panel: bool, execution_time: float | None, key: Array, theta: Any = None, config: dict[str, ~typing.Any]=<factory>, payload: Dataset = <factory>, timestamp: Timestamp = <factory>)[source]

Bases: object

Container for the output of a single inference run.

Parameters:
  • method (str) – Name of the method that produced this result ("pfilter", "mif", "train", "pmcmc", "abc", "dpop_train").

  • kind (str) – Payload shape: "table" (pfilter-style log-likelihood table) or "trace" (iteration-by-iteration parameter/likelihood traces).

  • panel (bool) – Whether this result came from a PanelPomp.

  • execution_time (float or None) – Total wall-clock execution time in seconds.

  • key (jax.Array) – The JAX random key used for the run.

  • theta (object, optional) – The parameter object (PompParameters / PanelParameters / list).

  • config (dict) – Run hyperparameters, used for summaries and merge-equality guards.

  • payload (xarray.Dataset) – All numeric arrays produced by the run, keyed by variable name.

  • timestamp (pandas.Timestamp) – When the result was created.

Attributes

acceptance_rate

Per-chain acceptance rate for MCMC-family results.

n_chains

Number of chains / parameter sets (size of the theta_idx dim).

theta: Any = None
method: str
kind: str
panel: bool
execution_time: float | None
key: Array
config: dict[str, Any]
payload: Dataset
timestamp: Timestamp

Methods

CLL([average])

Return conditional log-likelihoods as a pandas.DataFrame.

ESS([average])

Return effective sample sizes as a pandas.DataFrame.

merge(*results)

Merge results of the same type by concatenating along theta_idx.

print_summary([n])

Print a human-readable summary of this result.

to_dataframe([ignore_nan])

Convert this result to a tidy pandas.DataFrame.

traces()

Return the parameter/likelihood trace as a pandas.DataFrame.