generate_samples

probnum.statespace.generate_samples(rng, dynmod, measmod, initrv, times)[source]

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

Parameters
  • rng (Generator) – Random number generator.

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

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

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

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

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.