pyhgf.utils.sample.single_sample#
- pyhgf.utils.sample.single_sample(rng_key, initial_state, time_steps, sample_scan_fn, values_tuple, observed_tuple)[source]#
Perform a single prediction using the provided RNG key.
- Parameters:
rng_key – The JAX pseudo-random number generator key used to draw the sample.
initial_state (dict[int | str, dict]) – The initial attributes of the probabilistic network.
time_steps – The time steps at which the network is sampled.
sample_scan_fn – The scan function performing one belief-propagation step while sampling.
values_tuple – The per-input values fed to the network during sampling.
observed_tuple – The per-input observation masks indicating whether each value was observed.
- Returns:
The sampled node trajectories over the requested time steps.
- Return type: