Backward Sampler
cuthbert.smc.backward_sampler
Implements backward sampling for particle filters.
Supports 3 different algorithms for backward sampling:
cuthbertlib.smc.smoothing.tracing.simulate.cuthbertlib.smc.smoothing.exact_sampling.simulate.cuthbertlib.smc.smoothing.mcmc.simulate.
build_smoother(log_potential, backward_sampling_fn, resampling_fn, n_smoother_particles)
Build a particle smoother object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log_potential
|
LogPotential
|
Function to compute the JOINT log potential \(\log G_t(x_{t-1}, x_t) + \log M_t(x_t \mid x_{t-1})\). |
required |
backward_sampling_fn
|
BackwardSampling
|
Backward sampling algorithm to use (e.g., genealogy tracing, exact backward sampling).
This choice specifies how to sample \(x_{t-1} \sim p(x_{t-1} \mid x_t, y_{0:t-1})\) given
samples \(x_{t} \sim p(x_t \mid y_{0:T})\). See |
required |
resampling_fn
|
Resampling
|
Resampling algorithm to use (e.g., multinomial, systematic). |
required |
n_smoother_particles
|
int
|
Number of samples to draw from the backward sampling algorithm. |
required |
Returns:
| Type | Description |
|---|---|
Smoother
|
Particle smoother object. |