pypomp.Pomp.probe

Pomp.probe(probes: dict[str, Callable[[DataFrame], float]], nsim: int = 100, key: Array | None = None, theta: PompParameters | None = None) DataFrame

Assess goodness-of-fit by comparing data probes to simulated probes.

Computes user-supplied summary statistics (“probes”) on both the original observed data and nsim simulated data sets. The resulting DataFrame can be used to visually or formally test whether the model reproduces salient features of the data.

Parameters:
  • probes (dict of str to callable) – Dictionary mapping probe names to functions. Each function receives a DataFrame of observations (with time as the index) and returns a scalar, e.g. {"mean": lambda df: df["cases"].mean()}.

  • nsim (int, optional) – Number of simulation replicates. Defaults to 100.

  • key (jax.Array or None, optional) – JAX random key. Defaults to fresh_key.

  • theta (PompParameters or None, optional) – Parameter set to simulate from. Defaults to theta.

Returns:

Long-format DataFrame with columns probe, value, is_real_data, theta_idx, and sim.

Return type:

pd.DataFrame