pypomp.core.pomp.Pomp.probe

Pomp.probe(probes: dict[str, Callable[[DataFrame], float]], nsim: int = 100, key: Array | None = None, theta: Mapping[str, int | float | number | Array] | Sequence[Mapping[str, int | float | number | Array]] | pypomp.core.parameters.PompParameters | None = None) DataFrame[source]

Evaluates model diagnostics by comparing ‘probes’ (summary statistics) of real data against simulated data.

This method is useful for assessing model goodness-of-fit by checking if specific features of the observed data (e.g., mean, autocorrelation, peak height) are well-captured by simulations generated from the model’s parameters. It calculates the specified probe statistics for the original dataset and for multiple simulation replicates, providing a basis for visual or formal comparison.

Parameters:
  • probes (dict[str, Callable[[pd.DataFrame], float]]) – A dictionary of probe functions. Each function should receive a DataFrame of observations (with time as the index, or a single dataframe component) and return a numeric scalar. Example: {“mean”: lambda df: df[“obs”].mean()}

  • nsim (int, optional) – Number of simulations to run per parameter set. Defaults to 100.

  • key (jax.Array, optional) – JAX random key for the simulations.

  • theta (ThetaInput, optional) – Parameters to simulate from.

Returns:

A long-format DataFrame with columns:

probe, value, is_real_data, theta_idx, sim

Return type:

pd.DataFrame