Resampler
- class stonesoup.resampler.base.Resampler[source]
Bases:
stonesoup.base.Base
Resampler base class
Particle
- class stonesoup.resampler.particle.ESSResampler(threshold: float = None, resampler: Resampler = <class 'SystematicResampler'>)[source]
Bases:
stonesoup.resampler.base.Resampler
This wrapper uses a
Resampler
to resample the particles inside an instant ofParticles
, but only after checking if this is necessary by comparing Effective Sample Size (ESS) with a supplied threshold (numeric). Kish’s ESS is used, as recommended in Section 3.5 of this tutorial 1.References
- 1
Doucet A., Johansen A.M., 2009, Tutorial on Particle Filtering and Smoothing: Fifteen years later, Handbook of Nonlinear Filtering, Vol. 12.
- Parameters
threshold (
float
, optional) – Threshold compared with ESS to decide whether to resample. Default is number of particles divided by 2, set in resample methodresampler (
Resampler
, optional) – Resampler to wrap, which is called when ESS below threshold
- threshold: float
Threshold compared with ESS to decide whether to resample. Default is number of particles divided by 2, set in resample method
- resampler: stonesoup.resampler.base.Resampler
Resampler to wrap, which is called when ESS below threshold