-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Levy SSM inference using Particle Gibbs #94
Conversation
Pull Request Test Coverage Report for Build 7173173446
💛 - Coveralls |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #94 +/- ##
==========================================
- Coverage 96.09% 95.60% -0.49%
==========================================
Files 8 8
Lines 410 410
==========================================
- Hits 394 392 -2
- Misses 16 18 +2 ☔ View full report in Codecov by Sentry. |
return MixedState( | ||
rand(rng, MultivariateNormal(exp(dyn, dt) * state.x + μ, Σ)), path | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just mutate the state instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works in a purely filtering context, but if you then want to apply smoothing, you need all of the historic states saved, so mutating isn't an option.
I think this clunkiness is best solved by modifying AdvancedPS.jl to expect a sample to be returned rather than a distribution. I only wrote it this way to maintain compatibility.
I think this is as far as we can go with this commit with making substantial changes to AdvancedPS.jl — specifically, changing AdvancedPS.jl to expect a sample to be return by the transition function rather than a distribution. My feeling is that this is at a good point to merge. @yebai @FredericWantiez? |
path = simulate(model.θ.process, dt, s, t, ϵ) | ||
μ, Σ = meancov(t, model.θ.dyn, path, model.θ.nvm) | ||
Σ += 1e-6 * I | ||
return logpdf(MultivariateNormal(exp(dyn, dt) * state.x + μ, Σ), state.x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not using state
? Looks like should be something like:
let model = td.model, s = td.s, t = td.t, prev_state = td.current_state
...
return logpdf(MultivariateNormal(exp(dyn, dt) * prev_state.x + μ, Σ), state.x)
end
Apologies for making it a mess, but that's how it would look like with |
An example implementation of the Levy State Space Model (Godsill et al. 2020). Simulation of the driving Levy process is performed using the generalised shot noise formulation.