Skip to content

Conversation

charlesknipp
Copy link
Member

@charlesknipp charlesknipp commented Aug 21, 2025

With the addition of the state prior, there are a few minor changes that need to be made to the interface.

  • Update TracedSSM (would like some feedback here)
  • Fix unit test
  • Fix examples

I am not entirely happy about how I handle the TracedSSM containers since we have no type information without sampling from the state prior first.

Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@ee1052d). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #119   +/-   ##
=======================================
  Coverage        ?   96.27%           
=======================================
  Files           ?        8           
  Lines           ?      430           
  Branches        ?        0           
=======================================
  Hits            ?      414           
  Misses          ?       16           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

AdvancedPS.jl documentation for PR #119 is available at:
https://TuringLang.github.io/AdvancedPS.jl/previews/PR119/

@charlesknipp charlesknipp marked this pull request as ready for review August 21, 2025 20:53
@charlesknipp
Copy link
Member Author

Notes

@THargreaves I almost managed to get the Levy-SSM working, but fell short when defining the SSMProblems.logdensity for the Levy dynamics. I figured since we store the paths, it should be more efficient to grab the previous state's paths. The only issue is when we initialize in the first draft of this example, we set path[0] = GammaPath(T[], T[]), which causes the meancov function to error.

I also noticed the docs haven't successfully built in quite a long time, so I update the compat entry for Documenter since that seemed to cause issues with deploydocs.

Lastly, feel free to make any changes you see fit.

@THargreaves
Copy link
Contributor

@THargreaves I almost managed to get the Levy-SSM working, but fell short when defining the SSMProblems.logdensity for the Levy dynamics. I figured since we store the paths, it should be more efficient to grab the previous state's paths. The only issue is when we initialize in the first draft of this example, we set path[0] = GammaPath(T[], T[]), which causes the meancov function to error.

It's interesting coming to review my original code, now that I'm more comfortable with Lévy processes. It actually doesn't look like this implementation is correct.

I wrote the Lévy example before we had a RBPF implemented. The idea was to treat the subordinator jump simulation as part of the randomness of the transition dynamics. This works fine if you are just filtering (only using simulate) but the distribution it gives you is actually a conditional one on the specific jumps you generated for that simulation.

This means that the logpdf of the distribution returned by SSMProblems.distribution is not the correct logdensity for going from one state to another. In fact, for multivariate linear SDEs, there is no closed form for this logdensity, hence the need for RBPF and storing the jumps explicitly.

I made a proper Lévy SSM example using the RBPF for the Fusion paper. It's currently a bit broken after the interface changes we've made, but I can fix that and link to that repo from SSMProblems.jl README. This can replace this example (especially since Hong suggested we gradually move these Markovian examples out of AdvancedPS.jl).

I suggest given this implementation isn't actually correct, we remove this example.

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