Causal Inference 360 Open Source Toolkit
Our goal is to help guide data scientists who wish to move beyond observing differences (descriptive statistics) to quantifying cause-and-effect relationships in data. We also want to make it easy for machine learning practitioners who are shifting from solving prediction problems to asking what-if questions for decision-making support.
This open source Python toolkit is designed to bring long-standing machine-learning methodologies to the field of causal inference. We offer a set of established causal inference methods, along with some new ones, that can help you train causal models. It also includes a set of evaluation methods that let you select the correct method from the toolkit, choose the correct underlying model, and perform parameter tuning.
Our unique contribution lies not only in combining multiple causal inference models into one package, but also in adapting well-established machine-learning validation methodology to the context of causal inference, and adding a few causal-specific ones. The combination of multiple methods and the means to evaluate them is your key to building strong causal inference models that can be tested for reliability, consistency, and robustness.
Using our toolkit, you can now easily train causal models that estimate the effect of an intervention on an outcome. The models you use can be as complex or as simple as your problem and your data requires. We invite you to use the toolkit and to help us improve it.
If you use this package, please reference Shimoni et at., 2019
Not sure what to do first? Start here!
Learn more about causal inference concepts, terminology, and tools before you begin.
Try a Web Demo
Step through the process of causal inference analysis in an interactive, step-by-step web demo that shows a sample of capabilities available in this toolkit.
Read a Paper
Read a paper describing a suggested workflow for causal analysis based on causal model selection and iterative cohort refinement.
Step through a set of in-depth examples that introduce developers to code that performs causal inference analysis in different application domains.
Ask a Question
Join our Causal Inference 360 Slack Channel to ask questions, make comments, and tell stories about how you use the toolkit.
Open a directory of Jupyter notebooks in GitHub that provide working examples of causal inference in sample datasets.
You can add new algorithms, models and evaluations in GitHub. Share Jupyter notebooks showcasing how you have applied causal inference in your data science question.
Learn how to put this toolkit to work for your application or industry problem. Try these tutorials.
How Does Smoking Cessation Affect Weight Loss?
Quantify the cause-and-effect relationship between quitting smoking and losing weight.
Do Agricultural Techniques Affect Water Pollution?
Check whether agricultural conservation measures prevent phosphorus pollution in runoff water.
How Do Marketing Campaigns Affect Long-Term Bank Deposits Purchases?
See how different marketing approaches affect the portion of clients buying long-term deposits.
Does Job Training Increase Earnings for Underprivileged Individuals?
Understand the effectiveness of job training programs on the earnings of individuals two years later.
See how forest management policy affects the well being of forests.
See how interest rates affects the risk of defaulting.
These are some models that enable causal effect estimation. Contribute more!
Inverse Probability Weighting
Learn the probability of being treated to create a weighting scheme that balances the treatment groups.
Use the treatment assignment as a feature to predict potential outcomes directly with greater statistical power.
Model the outcome of each treatment group separately to allow greater modeling flexibility.
Doubly Robust Method
Use both inverse probability weighting and outcome learners to estimate the average treatment effect.
Doubly Robust Method with Inverse Probability Feature
Use inverse probability weights as auxiliary information to an outcome model.
Doubly Robust Method with Importance Sampling
Use inverse probability weights to reweigh the data instances fed to the outcome model.
Heterogeneous Effect Mixture Model
Use an interpretable mixture model to discover subgroups with different treatment effects.
Causal inference models are hard to fully validate, but here are some tools to help detect those that perform poorly.
Outcome Models Evaluator
Scores evaluations that help select outcome models.
Weight Models Evaluator
Scores evaluations that help select weight models.
Counterfactual Common Support Plot
Check the ignorability and consistency of the predictions by plotting the predicted counterfactual outcomes.
Performance Curve Plot
View precision, recall, and ROC curves, including our novel weighted-ROC curve.
Propensity Score Distribution Plot
Check for consistency and positivity violations.
Feature Imbalance Plot
Check which features differ between treatment groups, and which of these biases was properly corrected.
See how this package was used in research projects.
Drug Repurposing to Alleviate Symptoms of Parkinson's Disease
Using causal inference to emulate clinical trials.
Identifying the Effect of COVID-19 on Medical Screening
During the pandemic there were more people who missed their appointments. Is that due to restrictions or was it self imposed?
Creating and Testing a Realistic Causal Inference Benchmark
In-lieu of a gold-standard simulated data was constructed and tested using our package against 1500 models and parameters.