PanelPomp Class¶
- class pypomp.panel.panel.PanelPomp(Pomp_dict: dict[str, Pomp], theta: PanelParameters | dict[str, DataFrame | None] | list[dict[str, DataFrame | None]] | None = None)[source]¶
Bases:
PanelValidationMixin,PanelEstimationMixin,PanelAnalysisMixinThe PanelPomp class represents a panel of partially observed Markov process models. It extends the single-unit POMP framework to handle multiple units that share structural characteristics but may have distinct parameter values and observations.
In particular, the class provides methods for:
Simulation of panel models
Particle filtering for panel models
Marginalized Panel Iterated Filtering (MPIF)
Gradient descent via automatic differentiation
- Parameters:
Pomp_dict (dict[str, Pomp]) – A dictionary mapping unit names to Pomp objects. Each Pomp object represents a single unit in the panel data. The keys are used as unit identifiers.
theta (PanelParameters | dict | list, optional) – A PanelParameters object, a dictionary with “shared” and “unit_specific” keys, or a list of such dictionaries.
Attributes
Returns a tidy DataFrame with the observations from all units. |
|
Core Algorithmic Methods
|
Simulate the PanelPomp model. |
|
Run the particle filter (SMC) algorithm on the PanelPomp model. |
|
Estimate parameters using the Panel Iterated Filtering (PIF) algorithm for PanelPomp. |
|
Estimate parameters using chunked gradient-descent optimization (SGD/Adam). |
Supporting Methods
|
|
|
Sample parameters for PanelPomp models. |
|
Prune the parameter sets to the top n based on log-likelihoods stored in the PanelParameters object under theta. |
Sorts unit-specific parameters and shared parameters in descending order of unit log-likelihood and shared log-likelihood, respectively, then combines them to form new parameter sets. |
|
|
Returns a tidy DataFrame with the results of the method run at the given index. |
|
Returns a tidy DataFrame with the conditional log-likelihoods of the method run at the given index. |
|
Returns a tidy DataFrame with the effective sample size of the method run at the given index. |
|
Return a DataFrame summarizing the execution times of methods run. |
|
Return a tidy DataFrame with the full trace of log-likelihoods and parameters from the entire result history. |
|
Evaluate probe statistics on the model's true data and simulated data for each unit. |
|
Fits an independent ARIMA model to the observation data for each unit and returns a DataFrame with the estimated log-likelihoods for each unit and the total. |
|
Fits a Negative Binomial model to the observation data for each unit and returns a DataFrame with the estimated log-likelihoods for each unit and the total. |
|
Plots the parameter and log-likelihood traces from the entire result history. |
|
Runs simulations for the PanelPomp model and plots them against true data. |
Prints the creation and runtime environment metadata for this instance. |
|
|
Print a summary of the PanelPomp object. |
|
Merge replications from multiple PanelPomp objects into a single object. |