SSMProblems
Installation
In the julia
REPL:
]add SSMProblems
Documentation
SSMProblems
defines a generic interface for State Space Problems (SSM). The main objective is to provide a consistent interface to work with SSMs and their logdensities.
Consider a markovian model from[Murray]:
The model is fully specified by the following densities:
- Initialisation: $f_0(x)$
- Transition: $f(x)$
- Emission: $g(x)$
And the dynamics of the model reduces to:
\[x_t | x_{t-1} \sim f(x_t | x_{t-1})\]
\[y_t | x_t \sim g(y_t | x_{t})\]
assuming $x_0 \sim f_0(x)$.
The joint law follows:
\[p(x_{0:T}, y_{0:T}) = f_0(x_0) \prod_t g(y_t | x_t) f(x_t | x_{t-1})\]
Model users can define their SSM
using the following interface:
-struct Model <: AbstractStateSpaceModel end
+Home · SSMProblems SSMProblems
Installation
In the julia
REPL:
]add SSMProblems
Documentation
SSMProblems
defines a generic interface for State Space Problems (SSM). The main objective is to provide a consistent interface to work with SSMs and their logdensities.
Consider a markovian model from[Murray]:
The model is fully specified by the following densities:
- Initialisation: $f_0(x)$
- Transition: $f(x)$
- Emission: $g(x)$
And the dynamics of the model reduces to:
\[\begin{aligned}
+x_t | x_{t-1} &\sim f(x_t | x_{t-1}) \\
+y_t | x_t &\sim g(y_t | x_{t})
+\end{aligned}\]
assuming $x_0 \sim f_0(x)$.
The joint law follows:
\[p(x_{0:T}, y_{0:T}) = f_0(x_0) \prod_t g(y_t | x_t) f(x_t | x_{t-1})\]
Users can define their SSM with SSMProblems
in the following way:
struct Model <: AbstractStateSpaceModel end
# Define the structure of the latent space
particleof(::Model) = Float64
@@ -36,4 +38,4 @@
particles[i] = transition!!(rng, t, model, particles[i])
logweights[i] += emission_logdensity(t, model, particles[i])
end
-end
Interface
SSMProblems.AbstractStateSpaceModel
— TypeAbstractStateSpaceModel
sourceSSMProblems.emission_logdensity
— Functionemission_logdensity(model, timestep, state, observation[, cache])
Compute the log potential of the current particle. This effectively "reweight" each particle.
sourceSSMProblems.transition!!
— Functiontransition!!(rng, model[, timestep, state, cache])
Simulate the particle for the next time step from the forward dynamics.
sourceSSMProblems.transition_logdensity
— Functiontransition_logdensity(model, timestep, prev_state, next_state[, cache])
(Optional) Computes the log-density of the forward transition if the density is available.
source- Murray
Murray, Lawrence & Lee, Anthony & Jacob, Pierre. (2013). Rethinking resampling in the particle filter on graphics processing units.
Settings
This document was generated with Documenter.jl version 0.27.25 on Thursday 7 September 2023. Using Julia version 1.9.3.
+end
Interface
SSMProblems.AbstractStateSpaceModel
— TypeAbstractStateSpaceModel
SSMProblems.emission_logdensity
— Functionemission_logdensity(model, state, observation[, timestep, cache])
Compute the log potential of the current particle. This effectively "reweight" each particle.
SSMProblems.linearize
— Methodlinearize(particle)
Return the trace of a particle, i.e. the sequence of states from the root to the particle.
SSMProblems.transition!!
— Functiontransition!!(rng, model[, timestep, state, cache])
Simulate the particle for the next time step from the forward dynamics.
SSMProblems.transition_logdensity
— Functiontransition_logdensity(model, prev_state, current_state[, timestep, cache])
(Optional) Computes the log-density of the forward transition if the density is available.
- Murray
Murray, Lawrence & Lee, Anthony & Jacob, Pierre. (2013). Rethinking resampling in the particle filter on graphics processing units.