pypomp.functional.PompStruct

class pypomp.functional.PompStruct(ys: Array, dt_array_extended: Array, nstep_array: Array, t0: float, times: Array, covars_extended: Array | None, accumvars: tuple[int, ...] | None, rinit_pf: Callable, rproc_pf: Callable, dmeas_pf: Callable | None, rinit_per: Callable, rproc_per: Callable, dmeas_per: Callable | None, rmeas_pf: Callable | None, par_trans: ParTrans, param_names: list[str])[source]

Bases: NamedTuple

Lightweight immutable JAX PyTree containing a compiled POMP model.

Packs the static data arrays and pre-compiled simulator callables for a POMP model into a single NamedTuple that can be passed through JAX JIT/vmap/grad boundaries. Obtain an instance from an existing Pomp object via to_struct().

Variables:
  • ys (jnp.ndarray) – Observation array of shape (n_times, n_obs).

  • dt_array_extended (jnp.ndarray) – Integration step sizes, extended to include the step from t0 to t1.

  • nstep_array (jnp.ndarray) – Number of integration steps per observation interval.

  • t0 (float) – Initial time.

  • times (jnp.ndarray) – Observation times of shape (n_times,).

  • covars_extended (jnp.ndarray or None) – Covariate array interpolated onto the integration grid, or None if no covariates are used.

  • accumvars (tuple of int or None) – Indices of accumulator state variables, or None.

  • rinit_pf (callable) – Compiled initial state simulator for the particle filter.

  • rproc_pf (callable) – Compiled state transition simulator for the particle filter.

  • dmeas_pf (callable or None) – Compiled measurement log-density for the particle filter.

  • rinit_per (callable) – Compiled initial state simulator for the IF2 perturbation loop.

  • rproc_per (callable) – Compiled state transition simulator for the IF2 perturbation loop.

  • dmeas_per (callable or None) – Compiled measurement log-density for the IF2 perturbation loop.

  • rmeas_pf (callable or None) – Compiled measurement simulator for simulate().

  • par_trans (ParTrans) – Parameter transformation object.

  • param_names (list of str) – Canonical parameter name ordering.

See also

pypomp.Pomp.to_struct

Construct a PompStruct from a Pomp model.

Attributes

accumvars: tuple[int, ...] | None

Alias for field number 6

covars_extended: Array | None

Alias for field number 5

dmeas_per: Callable | None

Alias for field number 12

dmeas_pf: Callable | None

Alias for field number 9

dt_array_extended: Array

Alias for field number 1

nstep_array: Array

Alias for field number 2

par_trans: ParTrans

Alias for field number 14

param_names: list[str]

Alias for field number 15

rinit_per: Callable

Alias for field number 10

rinit_pf: Callable

Alias for field number 7

rmeas_pf: Callable | None

Alias for field number 13

rproc_per: Callable

Alias for field number 11

rproc_pf: Callable

Alias for field number 8

t0: float

Alias for field number 3

times: Array

Alias for field number 4

ys: Array

Alias for field number 0

Methods

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.