PanelPomp Class¶
- class pypomp.panel.panel.PanelPomp(Pomp_dict: dict[str, Pomp], theta: PanelParameters)[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 toPompobjects. EachPompobject represents a single unit in the panel data. The keys are used as unit identifiers.theta (
PanelParameters, optional) – APanelParametersobject containing the model parameters.
Attributes
- PanelPomp.ys¶
Returns a tidy DataFrame with the observations from all units.
- PanelPomp.unit_objects: dict[str, Pomp]¶
A dictionary mapping unit names to their corresponding
Pompobjects.
- PanelPomp.theta¶
The parameter object for the panel model.
- PanelPomp.results_history: ResultsHistory¶
A
ResultsHistoryobject 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.
- PanelPomp.canonical_param_names: list[str]¶
All unique parameter names present in either the shared or unit-specific parameters.
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.
Core Algorithmic Methods
|
Simulate the |
|
Run the particle filter (SMC) algorithm on the |
|
Estimate parameters using the Panel Iterated Filtering (PIF) algorithm for |
|
Estimate parameters using chunked gradient-descent optimization (SGD/Adam). |
Supporting Methods
Returns a list of the names of the units in the panel. |
|
|
Get the parameter values for a specific unit across all replicates. |
|
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. |