Skip to content

Add iterated filtering and a Dacca example - #286

Open
kunyanghe21 wants to merge 2 commits into
state-space-models:mainfrom
kunyanghe21:if2-dacca-independent
Open

kunyanghe21 wants to merge 2 commits into
state-space-models:mainfrom
kunyanghe21:if2-dacca-independent

Conversation

@kunyanghe21

@kunyanghe21 kunyanghe21 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

This adds cuthbert.smc.iterated_filtering.fit and a small Dacca cholera example. The IF2 implementation uses Cuthbert's existing particle-filter callbacks and resampling functions. It perturbs parameters, resamples them with the state particles, and reduces the perturbation scale between iterations.

The tests compare the final parameter particles, the parameter means at each iteration and the perturbed log likelihoods with a separate IF2 calculation. The SMC and Dacca tests passed locally (117 tests, including 29 specific to IF2 and Dacca). The Dacca example also ran from the installed wheels.

To run the IF2 and Dacca tests from the repository root:

JAX_PLATFORMS=cpu python -m pytest tests/cuthbert/smc/test_iterated_filtering.py tests/examples/test_dacca.py

The larger comparison, including failed checks and fits, is recorded in pypomp/comparisons: numerical checks and optimization results.

We understand that IF2 and this example may not fit Cuthbert's planned direction, and that you may prefer not to include them.

The code and documentation were prepared with AI assistance.

@AdrienCorenflos

Copy link
Copy Markdown
Contributor

@SamDuffield anything left on your side?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants