2.5.2. pywhy_graphs.functional.apply_linear_soft_intervention#
- pywhy_graphs.functional.apply_linear_soft_intervention(G, targets: Set[int | float | str | Any], type: str = 'additive', random_state=None)[source]#
- Applies a soft intervention to a linear Gaussian graph. - Parameters:
- GGraph
- Linear functional causal graph. 
- targetsSet[Node]
- The set of nodes to intervene on simultanenously. 
- typestr, optional
- Type of intervention, by default “additive”. 
- random_stateRandomState, optional
- Random seed, by default None. 
 
- Returns:
- GGraph
- The functional linear causal graph with the intervention applied on the target nodes. The perturbation occurs on the - gaussian_noise_functionof the target nodes. That is, the soft intervention, perturbs the exogenous noise of the target nodes.