Skip to content


class ParticleFilter < Object

Particle filter.

The ParticleFilter class hierarchy is as follows:

Member Variables

Name Description
nsteps:Integer? Number of steps. If this has no value, the model will be required to suggest an appropriate value.
nforecasts:Integer Number of additional forecast steps per step.
nparticles:Integer Number of particles.
trigger:Real Threshold for resampling. Resampling is performed whenever the effective sample size, as a proportion of N, drops below this threshold.
delayed:Boolean Should delayed sampling be used?
ancestor:Boolean Should ancestor sampling be used for conditional filter?

Member Fibers

Name Description
filter Filter.
forecast Forecast.

Member Fiber Details


fiber filter(model:Model) -> (Model[_], Real[_], Real, Real, Integer)!


  • model: The model.

Yields: a tuple giving, in order: - particle states, - particle log weights, - log normalizing constant estimate, - effective sample size, - total number of propagations used to obtain these, which may include rejected particles.


fiber forecast(t:Integer, x:Model[_], w:Real[_]) -> (Model[_], Real[_])!


  • t: Time step.
  • x: Starting states.
  • w: Starting log weights.

Yields: a tuple giving, in order: - particle states, - particle log weights.