NonlinearSSM.particle_smoother#
- NonlinearSSM.particle_smoother(y, *, n_particles=500, ess_threshold=0.5, seed=None)[source]#
Forward-filtering backward-smoothing (Doucet-Godsill-Andrieu).
A bootstrap forward pass stores every weighted cloud, and the backward recursion reweights each of them through the transition density
N(f(x), Q). That density is why the method’s reach differs from the particle filter’s: a customobservation_loglikis fine (it only enters the forward weights), but a customtransition_samplerexposes draws without a density and is refused, as is a singularQ.The costs are quadratic and stated rather than hidden: time is
O(n_particles**2)per period and the forward clouds are held in full, so the default cloud is smaller than the filter’s – raise it only knowing both bills scale with its square and its size respectively.- Parameters:
- Return type:
_ParticleSmootherResult- Returns:
The
_ParticleSmootherResult.- Raises:
SpecificationError – If the model carries a transition sampler hook or the bookkeeping is malformed.
NumericalError – If
Qis singular or the cloud degenerates.