#125125th of 206 in ML frameworks and libraries
pgmpy
Python library for causal discovery and inference with Bayesian networks
Documentation ↗
(opens in a new tab)Website ↗
(opens in a new tab)Repository on GitHub ↗
(opens in a new tab)
- Stars
- 3.4k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Apr 2026
- Language
- Python
Missed the latest GitHub check; these facts may be older.
Overview
pgmpy is a Python library with data structures for DAGs, PDAGs, MAGs, PAGs, Bayesian Networks, Dynamic Bayesian Networks and Structural Equation Models. It covers structure learning (for example the PC estimator), parameter estimation, probabilistic and causal inference, model validation and data simulation. Estimators follow a composable API that is scikit-learn compatible where possible.
Who it is for: Data scientists and researchers doing causal or probabilistic modeling
Strengths
- Covers discrete, linear Gaussian and functional (mixed) Bayesian networks in one API
- Includes structure learning, parameter fitting, inference and simulation in the same library
- Ships example datasets and models, such as bnlearn alarm and ecoli70
- Installs from PyPI or conda-forge; MIT license
Weaknesses
- Functional Bayesian Networks need the torch backend and pyro
- Not an LLM tool; no agent, model-serving or LLM integration
- Learning and inference examples for functional networks live in a separate notebook, not the README
What it needs
- Needs torch and pyro (Functional Bayesian Networks only)
- Models: DAG, PDAG, MAG, PAG, Discrete Bayesian Network
Also in ML frameworks and libraries
See all 206| Rank | Project | Score |
|---|---|---|
| 1 | transformersPython library defining open models for text, vision, audio and multimodal tasks | 94 out of 100 |
| 2 | ultralyticsPython library and CLI for training and running YOLO vision models | 94 out of 100 |
| 3 | pytorchPython tensor library with GPU support and tape-based autograd | 93 out of 100 |
| #4 | pytorch-image-modelsPyTorch library of image models, pretrained weights and training scripts | 93 out of 100 |
| #5 | supervisionPython toolkit for loading, annotating and counting computer vision detections | 92 out of 100 |