pypomp.proposals.MVNRWAdaptive

class pypomp.proposals.MVNRWAdaptive(init_rw_var: Array, param_names: tuple[str, ...], scale_start: int = 200, scale_cooling: float = 0.999, shape_start: int = 200, target: float = 0.234, max_scaling: float = 50.0)[source]

Bases: object

Adaptive multivariate normal random-walk proposal (Roberts & Rosenthal 2009).

Implements two-phase adaptation:

  • Phase 1 (n >= scale_start and accepts < shape_start): a global scaling factor is adjusted to drive the acceptance ratio toward target.

  • Phase 2 (accepts >= shape_start): the proposal covariance is replaced by the scaled empirical covariance (2.38^2 / d) * cov_emp.

Cholesky is computed each step with a small jitter (1e-10 * I) for JIT-friendly numerical robustness.

Variables:
  • init_rw_var (jax.Array) – (d, d) initial covariance matrix.

  • param_names (tuple of str) – Tuple of parameter names corresponding to rows/columns of init_rw_var.

  • scale_start (int) – Iteration index at which Phase 1 begins.

  • scale_cooling (float) – Cooling base for the scale update.

  • shape_start (int) – Accepted-proposal count at which to switch to Phase 2.

  • target (float) – Target Metropolis acceptance ratio.

  • max_scaling (float) – Upper bound for the scaling factor.

Attributes

max_scaling: float = 50.0
scale_cooling: float = 0.999
scale_start: int = 200
shape_start: int = 200
target: float = 0.234
init_rw_var: Array
param_names: tuple[str, ...]

Methods

init_state(theta_arr)

step(state, theta_arr, key, n, accepts)