causality icon indicating copy to clipboard operation
causality copied to clipboard

Back door adjustments

Open sotomsa opened this issue 6 years ago • 2 comments

First version of exaustive search minimal admissable sets that satisfy the back door criterion.

It is based on a d-separation function from pgmpy package (https://github.com/pgmpy/pgmpy). It implements an algorithm found in "Probabilistic Graphical Models: Principles and Techniques" - Koller and Friedman. Is it possible to integrate that piece of code giving the proper credit to the coders? ( That packagee is under MIT License but I do not know much about licenses)

I have also found a polinomial time version of the minimal admissable sets algorithm described in https://arxiv.org/abs/1202.3764 by Johannes Textor and implementedin his cool project DAGitty (http://www.dagitty.net/dags.html) which is a javascript browser-based causal inference analyzer.

At the last minute I realized that you use different naming conventions for functions while I use camelCase naming convention. I can change that later if the rest of the code is ok.

sotomsa avatar Aug 27 '18 19:08 sotomsa

Forgot to mention, it only works with DAGs at this moment

sotomsa avatar Aug 27 '18 19:08 sotomsa

Hello Adam,

I have finally found some time to improve the PR code. Mainly, I have

  • Changed the function names so that it has the same naming convention that you use.
  • Converted the function into a generator function as you suggested for MVP
  • Improved the test coverage which will be useful in order to check a polynomial time version of the same algorithm.
  • Temporarly added all the code that is used from pgmpy (all is stored in utils.py) so that it is easier to check how the code works.

Best,

sotomsa avatar Sep 12 '18 20:09 sotomsa