PanelPomp Class

class pypomp.PanelPomp(Pomp_dict: dict[str, Pomp], theta: PanelParameters)[source]

Bases: PanelValidationMixin, PanelEstimationMixin, PanelAnalysisMixin

Panel of partially observed Markov process models.

Extends the single-unit POMP framework to handle multiple units that share structural characteristics but may have distinct parameter values and observations.

Parameters:
  • Pomp_dict (dict of str to Pomp) – Mapping from unit names to Pomp objects.

  • theta (PanelParameters) – A PanelParameters object containing the model parameters.

Attributes

PanelPomp.ys

Tidy DataFrame containing observations from all units.

Returns:

Long-format DataFrame of observations.

Return type:

pd.DataFrame

PanelPomp.theta

The parameter object for the panel model.

PanelPomp.unit_objects: dict[str, Pomp]

A dictionary mapping unit names to their corresponding Pomp objects.

PanelPomp.canonical_param_names: list[str]

All unique parameter names present in either the shared or unit-specific parameters.

PanelPomp.canonical_shared_param_names: list[str]

Parameter names of parameters with values shared across all units in the panel.

PanelPomp.canonical_unit_param_names: list[str]

Parameter names of parameters with values specific to individual units in the panel.

PanelPomp.results_history: ResultsHistory

A ResultsHistory object storing the history of results from method calls.

PanelPomp.fresh_key: Array | None

Running a method that accepts a JAX PRNG key will store a fresh, unused key here.

PanelPomp.metadata: ModelMetadata

Environment and version metadata initialized when this instance was built.

Core Algorithmic Methods

simulate(key[, theta, times, nsim, as_pomp])

Simulate latent states and observations from the panel model.

pfilter(J[, key, theta, thresh, reps, ...])

Run the bootstrap particle filter (SMC) algorithm.

mif(J, M, rw_sd[, key, theta, thresh, ...])

Estimate parameters using the (Marginalized) Panel Iterated Filtering (MPIF/PIF) algorithm.

train(J, M, eta[, chunk_size, optimizer, ...])

Estimate parameters using MOP-based gradient-descent optimization.

dpop_train(J, M, eta[, chunk_size, ...])

Estimate parameters using DPOP-based gradient-descent optimization.

Results

results([index, ignore_nan])

Get the results DataFrame for the specified history index.

CLL([index, average])

Get conditional log-likelihoods for the specified history index.

ESS([index, average])

Get Effective Sample Size for the specified history index.

traces()

Get a tidy DataFrame with the full trace history of replicates.

Other Supporting Methods

get_unit_names()

Returns a list of the names of the units in the panel.

get_unit_parameters(unit[, theta])

Get parameter values for a specific unit across all replicates.

sample_params(param_bounds, units, n, key[, ...])

Sample parameters uniformly within bounds for a panel model.

to_struct()

Export static data and compiled simulators into a JAX PyTree.

prune([n, refill])

Prune replicates down to the top n by log-likelihood.

mix_and_match()

Sort parameters independently and cross-combine them.

time()

Get a DataFrame summarizing execution times of run methods.

probe(probes, key[, nsim, theta])

Evaluate probe statistics on real and simulated data for each unit.

arma([order, log_ys, suppress_warnings])

Fit an independent ARIMA model to the observation data of each unit.

negbin([autoregressive, suppress_warnings])

Fit a Negative Binomial model to the observation data of each unit.

print_metadata()

Prints the creation and runtime environment metadata for this instance.

print_summary([n])

Print a summary of the PanelPomp object.

merge(*panel_pomp_objs)

Merge replications from multiple PanelPomp objects into a single object.

Visualization

plot_traces([which, show])

Plot parameter and log-likelihood traces from the result history.

plot_simulations(key[, nsim, mode, theta, show])

Simulate and plot observations against real data.