Python code of causal discovery algorithm proposed in
Causality in linear nongaussian acyclic models in the presence of latent gaussian confounders
Chen, Zhitang, and Laiwan Chan
Neural Computation 25.6 (2013): 1605-1641.
- numpy
- scipy
- sklearn
We test the code using python 3.6.8 on Windows 10. Any later version should still work perfectly.
After installing all required packages, you can run demo.py to see whether LiNGAM-GC could work normally.
The test code does the following:
- it generates 10,000 observations (a (10,000, 4) numpy array) from a causal model with 4 variables;
- it applies LiNGAM-GC to the generated data to infer the true causal graph.
mdl = LiNGAM_GC()
mdl.fit(X)
Detailed instructions on the usage is given in lingamgc.py
- Shoubo Hu - shoubo.sub [at] gmail.com
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.