Resampler
Particle
- class stonesoup.resampler.particle.SystematicResampler[source]
Bases:
Resampler
- resample(particles)[source]
Resample the particles
- Parameters:
particles (
ParticleState
or list ofParticle
) – The particles or particle state to be resampled according to their weights- Returns:
particle state – The particle state after resampling
- Return type:
- class stonesoup.resampler.particle.ESSResampler(threshold: float = None, resampler: ~Resampler = <class 'SystematicResampler'>)[source]
Bases:
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
- 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