pypomp.functional.panel_pfilter¶
- pypomp.functional.panel_pfilter(struct: PanelPompStruct, thetas_array: Array, J: int, keys: Array, thresh: float = 0.0, chunk_size: int = 1, CLL: bool = False, ESS: bool = False, filter_mean: bool = False, prediction_mean: bool = False) dict[str, Array][source]¶
Evaluate panel POMP log-likelihood via particle filtering.
A pure functional implementation of the panel particle filter, intended for composition within custom JAX loops.
- Parameters:
struct (PanelPompStruct) – Compiled structural representation of the Panel POMP model.
thetas_array (jax.Array) – Swarm of parameters of shape
(n_reps, U, n_params)on the natural scale, aligned with the canonical order ofstruct.shared_param_namesandstruct.unit_param_namesper unit.J (int) – Number of particles.
keys (jax.Array) – Random keys of shape
(n_reps, U_padded, ...).thresh (float, optional) – Resampling threshold. Defaults to
0.0.chunk_size (int, optional) – Number of units to process per chunk. Defaults to
1.CLL (bool, optional) – Whether to compute conditional log-likelihoods. Defaults to
False.ESS (bool, optional) – Whether to compute effective sample sizes. Defaults to
False.filter_mean (bool, optional) – Whether to compute filtered state means. Defaults to
False.prediction_mean (bool, optional) – Whether to compute prediction state means. Defaults to
False.
- Returns:
A dictionary containing the results of the panel particle filter. Always contains
'logLik'. Optionally contains'CLL','ESS','filter_mean', and'prediction_mean'if their corresponding flags areTrue.- Return type:
dict of str to jax.Array
Notes
To align and stack input parameter arrays into the correct canonical ordering, use
pypomp.functional.align_params().See also
pypomp.PanelPomp.pfilterObject-oriented interface.
align_paramsParameter alignment utility.