causal_testing.testing.intervention
This module contains the Intervention class, which intervenes on an input configuration
Module Contents
Classes
An intervention is an object which manipulates the input configuration of the scenario-under-test. It must define |
- class causal_testing.testing.intervention.Intervention(treatment_variables: tuple, treatment_values: tuple)
An intervention is an object which manipulates the input configuration of the scenario-under-test. It must define a method which takes the input configuration, does something to it, and returns a modified input configuration.
This provides a causal test case with two input configurations to compare: a control input configuration (the original) and a treatment input configuration (the modified). The causal test case then requires data for the execution of each of these input configurations to obtain the causal effect of this intervention.
- apply(input_configuration: dict)
Take an input configuration and modify it in a particular way.
It is the effect of this change a causal test case will focus on.
- Parameters:
input_configuration – Input configuration for the scenario-under-test.
- Return treatment_input_configuration:
a modified input configuration.
- __str__()
Return str(self).