:py:mod:`causal_testing.testing.intervention` ============================================= .. py:module:: causal_testing.testing.intervention .. autoapi-nested-parse:: This module contains the Intervention class, which intervenes on an input configuration Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: causal_testing.testing.intervention.Intervention .. py:class:: 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. .. py:method:: 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. :param input_configuration: Input configuration for the scenario-under-test. :return treatment_input_configuration: a modified input configuration. .. py:method:: __str__() Return str(self).