pgmpy is a Python toolkit for causal and probabilistic reasoning using graphical models.
The toolkit addresses the need to perform causal discovery, causal inference, and probabilistic reasoning on complex systems represented as graphs. It provides data structures for multiple types of graphical models including directed acyclic graphs, Bayesian networks, dynamic Bayesian networks, and structural equation models. The approach implements algorithms for tasks spanning causal discovery, causal identification, causal and probabilistic inference, model validation, parameter estimation, and simulation. A unifying design principle makes these algorithms composable and modular, allowing them to be extended or combined.
Developers working with causal inference or probabilistic graphical models should consider pgmpy if they need a comprehensive toolkit with broad algorithm coverage. The project suits research and applied work involving causal discovery pipelines, Bayesian network inference, or validation of causal models. The toolkit's scikit-learn compatibility means algorithms can be used standalone, integrated into sklearn pipelines, or serve as foundations for higher-level applications, making it flexible across different integration scenarios.
The project shows consistent development activity with regular commits across multiple areas of the codebase. Work spans algorithm implementations, documentation updates, and maintenance tasks. The toolkit receives contributions addressing both core functionality and peripheral concerns like build systems and testing infrastructure. Development appears distributed across different subsystems rather than concentrated in a single area.