AI GitHub
DoWhy for explicit causal analysis
Estimate causal effects under a stated model of relationships and assumptions.
Key Takeaways
- DoWhy separates causal modeling, identification, estimation and refutation.
- Define the intervention, outcome and assumptions before choosing an estimator.
- Use simulated data with a known treatment effect.
- A refutation check probes one assumption or failure mode.
How it works
DoWhy separates causal modeling, identification, estimation and refutation. The supplied graph or assumptions determine which effect can be identified from the available data.
What you need
Define the intervention, outcome and assumptions before choosing an estimator. Record which variables were measured and what unmeasured confounding could affect the analysis.
What to try first
Use simulated data with a known treatment effect. Draw the causal graph, estimate the effect and try a refutation test before analyzing observations.
Specify a variable that should be unrelated to treatment before testing refutation. Record which assumptions the check probes and which ones still need domain evidence.
Where to look for failures
A refutation check probes one assumption or failure mode. The result depends on whether the causal structure and measurement assumptions hold.
Related Franklin pages
An explanation of a prediction and an estimate of a causal effect ask different questions. Inspect the data and assumptions required by the selected analysis before interpreting its output.
- Fit explainable models and inspect feature effects with shared visualization tools. InterpretML for explainable predictive models
- Attribute a prediction to input features using explainer methods suited to the model. SHAP for explaining model predictions
For a primer on learning from data and evaluating predictions, see Franklin’s glossary. Machine learning
Project documentation
Try it for your workflow
Explore the project’s documentation for setup and usage, or save this page to a collection for later.
Read the project documentation ↗