A Python Framework for Causal Discovery in Non-Gaussian Linear Models: The PyCD-LiNGAM Library (International Journal of Intelligent Data and Machine Learning, 2025)
Background: Causal discovery from observational data is a critical challenge across scientific disciplines. While traditional methods often rely on correlation, they fail to distinguish between causation and spurious association. The Linear Non-Gaussian Acyclic Model (LiNGAM) addresses this by leveraging the non-Gaussianity of data to uniquely identify the causal structure, but a comprehensive, user-friendly, and open-source implementation in Python has been lacking.Methods: We introduce PyCD-LiNGAM, a dedicated Python framework designed for state-of-the-art causal discovery using LiNGAM-based methods. The library's core is built around specialized algorithms such as ICA-LiNGAM and DirectLiNGAM for robustly inferring causal ordering and estimating connection strengths. The framework is architected with a modular design, enabling researchers to easily configure parameters, integrate new methods, and handle complex scenarios through advanced features for latent confounder detection and time-series analysis. For validation, PyCD-LiNGAM includes tools for statistical reliability assessment via bootstrap methods and uses metrics like the Structural Hamming Distance (SHD) to evaluate performance.Results: Benchmark experiments conducted on both synthetic and real-world datasets demonstrate that PyCD-LiNGAM achieves high accuracy and strong scalability. The framework consistently outperforms established baseline methods by effectively recovering the true causal graph, especially in settings with non-Gaussian error distributions. The built-in visualization tools allow for clear and interpretable representation of the discovered directed acyclic graphs.Conclusion: PyCD-LiNGAM serves as a foundational and accessible tool for researchers to apply advanced causal discovery techniques. Its specialized design and robust implementation lower the barrier for integrating causal inference into data analysis pipelines across fields such as econometrics, neuroscience, and genomics. While currently focused on linear, acyclic models, future development will aim to extend the framework to include non-linear methods and improve scalability, further solidifying its role in evidence-based scientific research.