canari.component.intervention_component#
- class canari.component.intervention_component.Intervention(interv_state_index: int, contribute_to_obs: bool | None = False)[source]#
Bases:
BaseComponentIntervention class, inheriting from Canari’s BaseComponent. It is used to add a hidden state for intervention.
NOTE: This component is under development. At the moment, use one Intervention hidden state per intervention event.
- Parameters:
interv_state_index (int) – Index of hidden state make intervention.
contribute_to_obs (bool, optinal) – the intervention hidden state contribute to the observation or not. Defaults to False.
Examples
>>> from canari.component import Intervention >>> intervention = Intervention(interv_state_index=1) >>> intervention.transition_matrix array([[1]]) >>> intervention.process_noise_matrix array([[0]])