๐ŸŒ Github URL

https://github.com/papamoon0113/Causal-Discovery-Python-Implement

๐Ÿ“œ Read.me

Hi, there! ๐Ÿ‘‹ Iโ€™m a student studying Causal Discovery, and this page is created to share my implemented codes. All the codes here are implemented by using only numpy, scipy, pandas, and matplotlib.

While studying Causal Discovery, I found that there were few proper code implementation examples online. Most of the code online used pre-existing package, such as networkx, dowhy, cdt, etc., which made it difficult to understand how the underlying algorithm really worked. (There is also a way to read the package code, but it is usually too complicated. ๐Ÿ˜“) As a result, I decided to implement the code myself based on research papers and books.

I share my code for the people who prefer to study while implementing the code themselves, rather than relying on pre-existing package. I recommend to follow Implementation Procedure below. I hope that my work will be helpful for you. ๐Ÿ˜

I recommend it to people like this!

  • Who wants to understand Causal Discovery algorithms while implementing them ๐Ÿ‘ฆ
  • Who wants to implement their own algorithm by modifying pre-existing algorithms ๐Ÿ‘ฉ

Implementation Procedure

0. DAG Pattern

โ— We donโ€™t use networkx. We will implement our own graph class. Visualization, too

TitleImplementationNotebook url
DAG Pattern_baseFoundation of DAG PatternClick!
DAG Pattern_d_separationMethods related to d-separationClick!
DAG Pattern_visualizationVisualization (Force-directed graph drawing)Click!

1. Nonparametric CI Test

TitleImplementationNotebook url
Nonparametric CI Test_MIConditional Mutual InformationClick!
Nonparametric CI Test_KCITKCIT, Kernel-based Conditional Independence TestClick!

2. Constraint-based Algorithm

TitleImplementationNotebook url
Constraint-based Algorithm_basicBasic algorithm of Constraint-based AlgorithmClick!
Constraint-based Algorithm_pcPC algorithmClick!
Constraint-based Algorithm_cpcConservative PC algorithmClick!

Reference

[1] Geiger, D., Verma, T., & Pearl, J. (1990). d-Separation: From Theorems to Algorithms. In Machine Intelligence and Pattern Recognition (Vol. 10, Issue C)

[2] Zhang, K., Peters, J., Janzing, D., & Schรถlkopf, B. (2011). Kernel-based conditional independence test and application in causal discovery. Proceedings of the 27th Conference on Uncertainty in Artificial Intelligence, UAI 2011

[3] Metropolitan. (2004). Learning Bayesian Networks. chapter 10.

[4] Verma, T., Pearl, J. (1990). On the Equivalence of Causal Models. Appears in Proceedings of the Sixth Conference on Uncertainty in Artificial Intelligence (UAI1990).

[5] Meek, C. (1995). Causal inference and causal explanation with background knowledge. Conference on Uncertainty in Artificial Intelligence.

[6] Ramsey, J., Spirtes, P., & Zhang, J. (2006). Adjacency-faithfulness and conservative causal inference. Proceedings of the 22nd Conference on Uncertainty in Artificial Intelligence, UAI 2006.

[7] Peter, J., Zanzing, D., Schรถlkopf, B. (2017). Elements of Causal Inference. The MIT Press

profile
move out to : https://lobster-tech.com?utm_source=velog

0๊ฐœ์˜ ๋Œ“๊ธ€