dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causa

What is dowhy?

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.

Overview of dowhy

What it is

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. It is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks. The library provides a wide variety of algorithms for effect estimation, prediction, quantification of causal influences, diagnosis of causal structures, root cause analysis, interventions and counterfactuals. A key feature of DoWhy is its refutation and falsification API that can test causal assumptions for any estimation method, thus making inference more robust and accessible to non-experts.

Key features

  • Effect estimation (identification, average causal effect, conditional average causal effect, instrumental variables and more)
  • Quantify causal influences (mediation analysis, direct arrow strength, intrinsic causal influence)
  • What-if analysis (generate samples from interventional distribution, estimate counterfactuals)
  • Root cause analysis and explanations (attribute anomalies to their causes, find causes for changes in distributions, estimate feature relevance and more)

Use cases

Decision-making involves understanding how different variables affect each other and predicting the outcome when some of them are changed to new values. DoWhy can be used for effect estimation (e.g., hotel booking cancellations, effect of customer loyalty programs, optimizing article headlines, effect of home visits on infant health, causes of customer churn/attrition) and root cause analysis and explanations (e.g., causal attribution and root-cause analysis of an online shop, finding the root cause of elevated latencies in a microservice architecture, finding root causes of changes in a supply chain).

Getting started

DoWhy supports Python 3.8+. To install the latest release using pip, run:shellpip install dowhyTo install using poetry:shellpoetry add dowhyTo install using conda:shellconda install -c conda-forge dowhyFor the latest dev version:shellpip install git+https://github.com/py-why/dowhy@main

License and pricing

The license is MIT. The pricing type is open_source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/py-whydowhy.svg)](https://yunodb.com/tools/py-whydowhy?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/py-whydowhy?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/py-whydowhy.svg" alt="Featured on YunoDB" height="20"></a>