generate_samples

probnum.statespace.generate_samples(dynmod, measmod, initrv, times, random_state=None)[source]

Samples true states and observations at pre-determined timesteps “times” for a state space model.

Parameters
  • dynmod (statespace.Transition) – Transition model describing the prior dynamics.

  • measmod (statespace.Transition) – Transition model describing the measurement model.

  • initrv (randvars.RandomVariable object) – Random variable according to initial distribution

  • times (np.ndarray, shape (n,)) – Timesteps on which the states are to be sampled.

  • random_state – Random state that is used to generate the samples from the latent state.

Returns

  • states (np.ndarray; shape (len(times), dynmod.dimension)) – True states according to dynamic model.

  • obs (np.ndarray; shape (len(times), measmod.dimension)) – Observations according to measurement model.