causica.datasets.interventional_data¶
Module Contents¶
Classes¶
Dataclass to hold the data associated with an intervention |
|
Dataclass to hold the data associated with a counterfactual |
- class causica.datasets.interventional_data.InterventionData[source]¶
Dataclass to hold the data associated with an intervention
This represents one intervention and many samples from the intervened distribution
The class also stores sampled_nodes, i.e. the ones that are neither intervened or conditioned on
- Parameters:¶
- intervention_data
A TensorDict with all the nodes (including intervened/conditioned)
- intervention_values
A dictionary of node names to 1D numpy arrays of the intervened values
- condition_values
A dictionary of node names to 1D numpy arrays of the conditioned values
- class causica.datasets.interventional_data.CounterfactualData[source]¶
Dataclass to hold the data associated with a counterfactual
This represents one intervention and reference and many samples from the intervened and reference distributions
The class also stores sampled_nodes, i.e. the ones that are neither intervened or conditioned on
- Parameters:¶
- counterfactual_data
A TensorDict with all of the node values (including intervened) of counterfactual data
- factual_data
A TensorDict with all of the node values of the base observations used for the counterfactuals data. This refers to the observations in “What would have happened (CFs) if I would have done (intervention) given I observed (base observation).
- intervention_values
A dictionary of node names to 1D numpy arrays of the intervened values