- class stonesoup.sampler.base.Sampler
Sampler base class
A sampler is used to generate samples from a probability distribution specified by the user. This class is provided to allow any set of samples to be generated from any specified distribution. A
Samplershould return sub-types of
- class stonesoup.sampler.particle.ParticleSampler(distribution_func: Callable, params: dict, ndim_state: int)
Callable) – Callable function that returns samples from the desired distribution.
dict) – Dictionary containing the keyword arguments for
int) – Number of dimensions in each sample.
- sample(params=None, timestamp=None)
Samples from the desired distribution and returns as a
params (dict, optional) – Keyword arguments for
distribution_func. These parameters will update the parameters specified in the class properties and can either be completely redefined or the subset of parameters that need changing.
particle state – The particle state containing the samples of the distribution
- Return type:
- class stonesoup.sampler.detection.DetectionSampler
Detection sampler base class.
Samples from a continuous distribution based on provided detections.
- class stonesoup.sampler.detection.GaussianDetectionParticleSampler(nsamples: int = 1)
Particle sampler using Gaussian detections to initialise the distribution.
Particle sampler that is preloaded with the
gm_sample()method for sampling from Gaussian mixture distributions. This class can handle one or more linear and non-linear Gaussian detections and will either return samples from a single or mixture of Gaussians depending on which is provided.
int, optional) – Number of samples to return
- class stonesoup.sampler.detection.SwitchingDetectionSampler(detection_sampler: DetectionSampler, backup_sampler: Sampler)
Redundant detection sampler class.
Redundant detection sampler accepts two
DetectionSamplerand one to fall back on when detections are not available. The samples returned depend on which samplers have been specified. Both samplers must have a
- sample(detections, timestamp=None)
Produces samples based on the detections provided.