
pgmpy is a pure python implementation for Bayesian Networks with a focus on modularity and extensibility. Implementations of various alogrithms for Structure Learning, Parameter Estimation, Approximate (Sampling Based) and Exact inference, and Causal Inference are available.
Supported Data Types
Structure Learning |
Parameter Estimation |
Causal Inference |
Probabilistic Inference |
|
---|---|---|---|---|
Discrete |
Yes |
Yes |
Yes |
Yes |
Continuous |
Yes (only PC) |
No |
Yes (partial) |
No |
Hybrid |
No |
No |
No |
No |
Time Series |
No |
Yes |
No |
Yes |
Algorithms
Structure Learning |
Parameter Learning |
Probabilistic Inference |
Causal Inference |
---|---|---|---|
PC with variants |
Maximum Likelihood |
Variable Elimination |
do-operation |
Hill-Climb Search |
Bayesian Estimator |
Belief Propagation |
adjustment sets |
Tree Search |
Expectation Maximization |
MPLP |
|
Max-Min Hill-Climb |
Sampling methods |
||
Exhaustive Search |
Example Notebooks
- 1. Example Using the Earthquake network
- 2. Monty Hall Problem
- 3. Creating discrete Bayesian Networks
- 4. Inference in Discrete Bayesian Network
- 5. Causal Games
- 6. Causal Inference Examples
- 7. Parameter Learning in Discrete Bayesian Networks
- 8. Structure Learning in Bayesian Networks
- 9. Learning Tree Structure from Data using the Chow-Liu Algorithm
- 10. Learning Tree-augmented Naive Bayes (TAN) Structure from Data
- 11. Normal Bayesian Network (no time variation)
- 12. Extending pgmpy
Tutorial Notebooks
- 1. Introduction to Probabilitic Graphical Models
- 2. Bayesian Network
- 3. Causal Bayesian Networks
- 4. Markov Networks
- 5. Exact Inference in Graphical Models
- 6. Approximate Inference in Graphical Models
- 7. Parameterizing with Continuous Variables
- 8. Sampling In Continuous Graphical Models
- 9. Reading and Writing from pgmpy file formats
- 10. Learning Bayesian Networks from Data
- 11. A Bayesian Network to model the influence of energy consumption on greenhouse gases in Italy
All example notebooks are also available at: https://github.com/pgmpy/pgmpy/tree/dev/examples All tutorial notebooks are also available at: https://github.com/pgmpy/pgmpy_notebook