Make HierarchicalSSM compatible with the BF #70
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #34.
A middle-ground approach to making the HierarchicalSSM compatible with the bootstrap filter. I've add two special dynamics types and when
filter
is called withBootstrapFilter
andHierarchicalSSM
, the model is converted to a regularStateSpaceModel
using these two special types.I think a long-term ideal approach would be to introduce methods for
dynamics()
andobservations()
which construct the dynamics/observation process on the fly so that the inner functionsupdate
,predict
can act on the HierarchicalSSM directly. I found this ended up being quite faffy though and require some definitions on what exactly anAbstractStateSpaceModel
is which seems like a bit too big of a change to worry about right now (maybe later if we include mixed linear/non-linear models [1].What do you think @charlesknipp? Fine for now?
[1] F. Lindsten, P. Bunch, S. J. Godsill and T. B. Schön, "Rao-Blackwellized particle smoothers for mixed linear/nonlinear state-space models," 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 2013, pp. 6288-6292, doi: 10.1109/ICASSP.2013.6638875. keywords: {Trajectory;Smoothing methods;Monte Carlo methods;Approximation methods;Joints;Vectors;State-space methods;Rao-Blackwellization;particle smoothing;backward simulation;sequential Monte Carlo},