pgmpy is a Python package for causal inference and probabilistic inference using Directed Acyclic Graphs (DAGs) and Bayesian Networks with a focus on modularity and extensibility. Implementations of various algorithms for Causal Discovery (a.k.a, Structure Learning), Parameter Estimation, Approximate (Sampling Based) and Exact inference, and Causal Inference are available.
Supported Data Types¶
Casual Discovery |
Parameter Estimation |
Causal Inference |
Probabilistic Inference |
|
---|---|---|---|---|
Categorical |
Yes |
Yes |
Yes |
Yes |
Continuous |
Yes |
Yes |
Yes (partial) |
Yes |
Mixed |
Yes (only PC) |
No |
No |
No |
Time Series |
No |
Yes |
Yes (ApproximateInference) |
Yes |
Algorithms¶
Causal Discovery / Structure Learning |
Parameter Estimation |
Probabilistic Inference |
Causal Inference |
---|---|---|---|
PC with variants |
Maximum Likelihood |
Variable Elimination |
do-operation |
Greedy Equivalence Search(GES) |
Bayesian Estimator |
Belief Propagation |
adjustment sets |
Hill-Climb Search |
Expectation Maximization (EM) |
MPLP |
|
Expert In The Loop |
Sampling methods |
||
Tree Search |
|||
Max-Min Hill-Climb |
|||
Exhaustive Search |
Examples¶
Example notebooks: https://pgmpy.org/examples.html
Tutorial notebooks: https://pgmpy.org/tutorial.html
Citation¶
If you use pgmpy in your scientific work, please consider citing us:
Ankan, Ankur, Abinash, Panda. "pgmpy: Probabilistic Graphical Models using Python." Proceedings of the Python in Science Conference. SciPy, 2015.
Bibtex:
@inproceedings{Ankan2015,
series = {SciPy},
title = {pgmpy: Probabilistic Graphical Models using Python},
ISSN = {2575-9752},
url = {http://dx.doi.org/10.25080/Majora-7b98e3ed-001},
DOI = {10.25080/majora-7b98e3ed-001},
booktitle = {Proceedings of the Python in Science Conference},
publisher = {SciPy},
author = {Ankan, Ankur and Panda, Abinash},
year = {2015},
collection = {SciPy}
}