generate¶
-
probnum.filtsmooth.statespace.
generate
(dynmod, measmod, initrv, times, num_steps=5)[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 (probnum.RandomVariable object) – Random variable according to initial distribution
times (np.ndarray, shape (n,)) – Timesteps on which the states are to be sampled.
num_steps (int) – Number of steps to be taken for numerical integration of the continuous prior model. Optional. Default is 5. Irrelevant for time-invariant or discrete models.
- Returns
states (np.ndarray; shape (len(times), dynmod.dimension)) – True states according to dynamic model.
obs (np.ndarray; shape (len(times)-1, measmod.dimension)) – Observations according to measurement model.