py-why / 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.
https://www.pywhy.org/dowhy
MIT License
6.99k stars 923 forks source link

Adding model validation after user specifies model #412

Open robertness opened 2 years ago

robertness commented 2 years ago

It would be useful to enable users to validate their model using the global Markov property. I see two steps to this approach

  1. Enumerating d-separations and then running corresponding statistical verification. This is challenging because if you use statistical independence tests, the p-values will depend on the data. There are alternatives to independence tests (e.g. X should be a poor predictor of W when when the DAG says X and Y are independent) but this would require work to provide a unified interface.
  2. Verma constraints -- Some reference code here: https://github.com/y0-causal-inference/y0/issues/25. Once you calculate a constraint, it is easy to validate with item 1.
amit-sharma commented 2 years ago

This is a great direction and a high priority towards validating graphs. We have added a simple implementation of 1) by using statistical independence tests graph_refuter.py but it will be great to have a comprehensive implementation. Verma constraints will also be great to add.

Would you like to contribute to these?