Simulation Utilities
Simulation-related helper functions.
simulation_utils
¶
generate_irregular_t_emissions(T_total: Float, num_timesteps: int, T_filter: Optional[Float] = None, key=jr.PRNGKey(0)) -> Tuple[Array, Array, Array, int, int, int]
¶
Generate random time points for measurements, filtering and forecasting. sampled uniformly from a time domain \([0,T_total]\) where user can specificy filtering and forecasting intervals
Args: - T_total: Float, total time length - num_timesteps: int, total number of time points - T_filter: Optional[Float], end of filtering time - key: jr.PRNGKey, random key
Returns: - t_emissions: Array, time points for measurements - t_filter: Array, time points for filtering - t_forecast: Array, time points for forecasting - num_timesteps: int, total number of time points - num_timesteps_filter: int, number of time points for filtering - num_timesteps_forecast: int, number of time points for forecasting
make_key_sequence(seed: int)
¶
Returns an infinite sequence of PRNG keys based on the given seed.
tree_to_dict(tree)
¶
Convert a JAX tree to a dictionary.