pyhgf.updates.observation.set_observation#
- pyhgf.updates.observation.set_observation(attributes, node_idx, values, observed)[source]#
Add observations to the target node by setting the posterior to a given value.
- Parameters:
attributes (dict[int | str, dict]) – The attributes of the probabilistic network.
node_idx (int) – Pointer to the input node.
values (float) – The new observed value.
observed (int) – Whether value was observed or not.
- Returns:
The attributes of the probabilistic network.
- Return type: