pypomp.core.pomp.Pomp.dpop_train¶
- Pomp.dpop_train(J: int, M: int, eta: dict[str, float] | float, optimizer: str = 'Adam', alpha: float = 0.8, decay: float = 0.0, process_weight_state: str | None = None, key: Array | None = None, theta: Mapping[str, int | float | number | Array] | Sequence[Mapping[str, int | float | number | Array]] | pypomp.core.parameters.PompParameters | None = None) tuple[Array, Array][source]¶
Optimizes model parameters using the DPOP differentiable particle filter and gradient-based methods.
This method trains the model parameters to maximize the DPOP objective function using first-order optimizers like Adam or SGD, with optional learning rate decay. Gradients are computed efficiently via JAX reverse-mode automatic differentiation.
- Parameters:
J (int) – Number of particles.
M (int) – Number of gradient steps.
eta (dict[str, float] or float) – Learning rates. Either a dict of per-parameter learning rates keyed by parameter name, or a scalar float applied uniformly to all parameters.
optimizer (str, default "Adam") – Optimizer to use: “Adam” or “SGD”.
alpha (float, default 0.8) – DPOP discount / cooling factor.
decay (float, default 0.0) – Learning-rate decay coefficient. At iteration m, the effective learning rate is
eta / (1 + decay * m).process_weight_state (str or None, default None) – Name of the state component that stores the accumulated process log-weight (e.g.
"logw").key (jax.Array or None, default None) – Random key. If None, uses
self.fresh_key.theta (ThetaInput, default None) – Optional initial parameter(s). Accepts dict[str, Numeric], list[dict[str, Numeric]], or PompParameters. Numeric values are coerced to floats. Defaults to self.theta.
- Returns:
nll_history (jax.Array, shape (M+1,)) – Mean DPOP negative log-likelihood per observation at each step.
theta_history (jax.Array, shape (M+1, p)) – Parameter vector (estimation space) at each step.