Repository navigation
Conversation
|
This looks great. I don't initially love the assumed structure of |
|
I've added a function |
|
Also one point worth mentioning is that unlike the other particle filters, this one needs the unwrapped resampling function (sans ess decorator). This is because we need to keep track of when resampling happens, and this is the only way I could figure out which didn't require changes to the resampling module. |
SamDuffield
left a comment
There was a problem hiding this comment.
I like this, would be happy to merge with better documentation.
We should also make an issue about the ess decorator not being compatible here, we can maybe modify the resampling API so that it has this tracking there, although that can be a separate PR
Supersedes #243
Ok I've figured out a way to do this a lot more cleanly, reusing much of our existing particle filter code. It's a single file with only about 100 lines of code, and we don't need any parameter-specific types.
So the way this would work from the end user's POV is:
model_inputsnow contains the parameters, and the user has to declare how to package this with anadd_param_to_model_inputsfunction.InitSampleandPropagateSampletypes.build_filtermethod that this PR provides.Wdyt @SamDuffield ? I'll add the docstrings and some docs once we settle on the implementation and the API.
This also has the additional benefit that unlike #243, we can do hybrid filters, where we use a Kalman-type filter for the inner one.