quant: Quantitative tests of pypomp

These quantitative tests, or simply quant tests, are designed to assess the accuracy and performance of pypomp for problems existing on a scale too large to be run on a laptop within the unit tests in pypomp:pypomp/tests.

The quant tests also provide additional examples of pypomp, focused on technical issues that extend the simpler examples in pypomp:tutorials.


Quantitative Tests Index

Model tests

Each model is tested the same four ways. Likelihood, timing and scaling each have one report covering every model; estimation has one report per model.

  • Likelihood: particle filter log-likelihoods at fixed parameters, pypomp vs R pomp, compared as distributions (KS test, densities).
  • Estimation: IF2 global search from identical starting points, pypomp vs pomp: traces, final parameter estimates, final log-likelihoods.
  • Timing: IF2 and particle filter runtime on identical work, pypomp on GPU and CPU vs pomp.
  • Scaling: GPU runtime and peak VRAM as particles (\(J\)) and chains grow; where the GPU saturates.

PASS, CHECK or FAIL after a link is the worst result among that model’s automated checks in that report, computed when the report was last rendered. The automated checks only compare summary statistics, so each report also lists what its plots should show.

Model Likelihood Estimation Timing Scaling
SPX (S&P 500) report · PASS report · PASS report report
Dhaka cholera report · PASS — report report
Measles report · PASS¹ report · PASS report² report
Panel measles report · PASS report · PASS³ report report

¹ Also compares pypomp in 32- and 64-bit precision, on London and Halesworth.
² Also compares the fast samplers in pypomp.random with stock JAX samplers.
³ Block IF2, plus the pypomp-only mix-and-match step.

Method comparisons

  • IF2 vs IFAD (Dhaka cholera): how far iterated filtering alone and iterated filtering with gradient training get on the same likelihood for a comparable wall-clock budget.

Bayesian inference

Both share one SIR problem (tests/bayesian/model.py, model.R): estimate beta1 and rho under a flat box prior. tests/bayesian/reference/run.py computes the reference answers (grid posterior, rejection-sampled ABC posterior) that both reports read.

  • PMCMC · PASS: checks that pypomp’s particle marginal Metropolis-Hastings matches the grid posterior and R pomp’s pmcmc, and does not depend on the particle count.
  • ABC · PASS: checks that pypomp’s ABC-MCMC matches the exact ABC posterior and R pomp’s abc at each tolerance in a ladder, and returns the prior when the tolerance does not bind.

Random number generators

  • Fast samplers: speed and statistical accuracy of pypomp’s fast approximate inverse-CDF samplers (fast_poisson, fast_binomial, fast_gamma, fast_nbinomial) against jax.random and scipy.stats.