
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
pgmpy
Advanced tools
pgmpy is a Python package for working with Bayesian Networks and related models such as Directed Acyclic Graphs, Dynamic Bayesian Networks, and Structural Equation Models. It combines features from causal inference and probabilistic inference literature to allow users to seamlessly work between them. It implements algorithms for structure learning, causal discovery, parameter estimation, probabilistic and causal inference, and simulations.
If you use pgmpy in your scientific work, please consider citing us:
Ankur Ankan, & Johannes Textor (2024). pgmpy: A Python Toolkit for Bayesian Networks. Journal of Machine Learning Research, 25(265), 1–8.
Bibtex:
@article{Ankan2024,
author = {Ankur Ankan and Johannes Textor},
title = {pgmpy: A Python Toolkit for Bayesian Networks},
journal = {Journal of Machine Learning Research},
year = {2024},
volume = {25},
number = {265},
pages = {1--8},
url = {http://jmlr.org/papers/v25/23-0487.html}
}
The latest codebase is available in the dev branch of the repository.
To install pgmpy from the source code:
$ git clone https://github.com/pgmpy/pgmpy
$ cd pgmpy/
$ pip install -r requirements.txt
$ python setup.py install
To run the tests, you can use pytest:
$ pytest -v pgmpy
If you face any problems during installation let us know, via issues, mail or at our discord channel.
Please feel free to report any issues on GitHub: https://github.com/pgmpy/pgmpy/issues.
Before opening a pull request, please have a look at our contributing guide If you face any problems in pull request, feel free to ask them on the mailing list or gitter.
If you would like to implement any new features, please have a discussion about it before starting to work on it. If you are looking for some ideas for projects, we a list of mentored projects available at: https://github.com/pgmpy/pgmpy/wiki/Mentored-Projects.
We use sphinx to build the documentation. Please refer: https://github.com/pgmpy/pgmpy/wiki/Maintenance-Guide#building-docs for steps to build docs locally.
pgmpy is released under MIT License. You can read about our license at here
FAQs
A library for Probabilistic Graphical Models
We found that pgmpy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.