dowhy.causal_refuters package
Submodules
dowhy.causal_refuters.add_unobserved_common_cause module
- class dowhy.causal_refuters.add_unobserved_common_cause.AddUnobservedCommonCause(*args, **kwargs)[source]
Bases:
CausalRefuter
Add an unobserved confounder for refutation.
Supports additional parameters that can be specified in the refute_estimate() method.
‘confounders_effect_on_treatment’: how the simulated confounder affects the value of treatment. This can be linear (for continuous treatment) or binary_flip (for binary treatment)
‘confounders_effect_on_outcome’: how the simulated confounder affects the value of outcome. This can be linear (for continuous outcome) or binary_flip (for binary outcome)
‘effect_strength_on_treatment’: parameter for the strength of the effect of simulated confounder on treatment. For linear effect, it is the regression coeffient. For binary_flip, it is the probability that simulated confounder’s effect flips the value of treatment from 0 to 1 (or vice-versa).
‘effect_strength_on_outcome’: parameter for the strength of the effect of simulated confounder on outcome. For linear effect, it is the regression coeffient. For binary_flip, it is the probability that simulated confounder’s effect flips the value of outcome from 0 to 1 (or vice-versa).
TODO: Needs scaled version of the parameters and an interpretation module (e.g., in comparison to biggest effect of known confounder)
dowhy.causal_refuters.data_subset_refuter module
- class dowhy.causal_refuters.data_subset_refuter.DataSubsetRefuter(*args, **kwargs)[source]
Bases:
CausalRefuter
Refute an estimate by rerunning it on a random subset of the original data.
Supports additional parameters that can be specified in the refute_estimate() method.
‘subset_fraction’: Fraction of the data to be used for re-estimation.
dowhy.causal_refuters.placebo_treatment_refuter module
- class dowhy.causal_refuters.placebo_treatment_refuter.PlaceboTreatmentRefuter(*args, **kwargs)[source]
Bases:
CausalRefuter
Refute an estimate by replacing treatment with a randomly-generated placebo variable.
Supports additional parameters that can be specified in the refute_estimate() method.
‘_placebo_type’: Default is to generate random values for the treatment. If placebo_type is “permute”, then the original treatment values are permuted by row.
dowhy.causal_refuters.random_common_cause module
- class dowhy.causal_refuters.random_common_cause.RandomCommonCause(*args, **kwargs)[source]
Bases:
CausalRefuter
Refute an estimate by introducing a randomly generated confounder (that may have been unobserved).