pypomp.core.pomp.Pomp.dpop_train¶
- Pomp.dpop_train(J: int, M: int, eta: LearningRate, optimizer: Optimizer = Adam(clip_norm=None, scale=False, ls=False, c=0.1, max_ls_itn=10, beta1=0.9, beta2=0.999, epsilon=1e-08), alpha: float = 0.8, alpha_cooling: float = 1.0, decay: float = 0.0, process_weight_state: str | None = None, key: Array | None = None, theta: PompParameters | None = None) tuple[Array, Array][source]¶
Optimizes model parameters using the DPOP differentiable particle filter and gradient-based methods.
Warning
This method is experimental. Its API and behavior are subject to change in future releases.
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 (LearningRate) – Per-parameter learning rates as a LearningRate object. A full per-iteration schedule is applied (row m used at iteration m), so
LearningRate(rates).cosine_decay(0.05, M)works as expected.optimizer (Optimizer, default Adam()) – Optimizer configuration object, e.g.
Adam()orSGD(). Adam hyperparameters (beta1,beta2,epsilon) are read from the object; passAdam(beta1=0.0)to disable momentum (e.g. for the high-variance alpha=0 arm, matching the dmop/IFAD convention).alpha (float, default 0.8) – DPOP discount / cooling factor.
alpha_cooling (float, default 1.0) – Cosine cooling factor for alpha. This factor represents the multiplier for the distance of alpha from 1.0 by the end of training. The default keeps alpha fixed.
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 (PompParameters, default None) – Optional initial parameter(s). 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.