Proposal

class stonesoup.proposal.base.Proposal[source]

Bases: Base

abstractmethod rvs(*args, **kwargs)[source]

Proposal noise/sample generation function

Generates samples from the proposal.

Parameters:

state (State) – The state to generate samples from.

Simple

class stonesoup.proposal.simple.DynamicsProposal(transition_model: TransitionModel)[source]

Bases: Proposal

Proposal that uses the dynamics model as the importance density. This proposal uses the dynamics model to predict the next state, and then uses the predicted state as the prior for the measurement model.

Parameters:

transition_model (TransitionModel) – The transition model used to make the prediction

transition_model: TransitionModel

The transition model used to make the prediction

rvs(prior: State, measurement=None, time_interval=None, **kwargs) StateVector | StateVectors[source]

Generate samples from the proposal.

Parameters:
  • state (State) – The state to generate samples from.

  • measurement (Detection) – the measurement that will preferably used to get time interval if provided(the default is None)

  • time_interval (datetime.time_delta) – time interval of the prediction is needed to propagate the states

Returns:

State with samples drawn from the updated proposal

Return type:

ParticlePrediction

class stonesoup.proposal.simple.KalmanProposal(predictor: Predictor, updater: Updater)[source]

Bases: Proposal

This proposal uses the Kalman filter prediction and update steps to generate new set of particles and weights

Parameters:
  • predictor (Predictor) – predictor to use the various values

  • updater (Updater) – Updater used for update the values

predictor: Predictor

predictor to use the various values

updater: Updater

Updater used for update the values

rvs(prior: State, measurement: Detection = None, time_interval=None, **kwargs)[source]

Generate samples from the proposal.

Use the Kalman filter predictor and updater to create a new distribution

Parameters:
  • state (State) – The state to generate samples from.

  • measurement (Detection) – the measurement that is used in the update step of the Kalman prediction, (the default is None)

  • time_interval (datetime.time_delta) – time interval of the prediction is needed to propagate the states

Returns:

State with samples drawn from the updated proposal

Return type:

ParticlePrediction