Function that can generate interventions, especially when performing an intervention on multiple nodes. What the function is do is set one of the nodes to intervened (variable_intervened), and the other nodes to control. If what is 1, the intervened variable will be 1 and the rest 0, if what is 0, the intervened variable will be 0 and the rest will be one.

InterventionParser.generate_intervention(variables, variable_intervened,
  when, what)

Arguments

variables

the variables to create the intervention for (a list of all intervention nodes)

variable_intervened

the variable to perform the intervention on

when

integer when the intervention should take place

what

integer hat the intervention should be

Value

an intervention 'object' (i.e., a list following the intervention specification.