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.
A modification of the existing Levy SSM example to include the jumps (intensity and times) in the state.
This is important for performing inference on the jump times/location. This is largely in preparation for the future when the jump times/locations are sampled using a more intricate method than forward simulation (Yaman has a simple SMCMC approach, but there are probably more nuanced approaches).
I've taken quite a hacky approach, but I'm struggling to see another way. Specifically, AdvancedPS expects
transition
to return a distribution rather than a new state. This meant that I needed to define aTransitionDistribution
struct with arand
method that runs the sampling.Another approach is creating a Dirac point distribution at the new state but that feels like an unstable approach to me.
Changing AdvancedPS to expect a new sample to be returned from
transition
also doesn't quite work. For PG this is fine but for PGAS we need to calculate the log prob of the transition distribution too.