pyAgrum-nightly
Bayesian networks and other Probabilistic Graphical Models.
What it is and what it does
pyAgrum wraps a C++ probabilistic graphical model library and exposes it through a Python API for Bayesian Networks and related models. It lets you construct networks by adding nodes and arcs, populate conditional probability tables, save and load models in standard formats (BIF), and run inference algorithms to compute posterior probabilities given evidence.
The library is designed for researchers and practitioners in AI, statistics, and decision analysis who need to model uncertainty and reason under incomplete information. It depends on numpy for numerical operations, matplotlib for visualization, pydot for graph layout, and scikit-learn for machine learning integration. The package supports modern Python versions (3.10–3.14) and runs on macOS, Linux, and Windows.
Use it for:
- Build and query Bayesian networks to model causal relationships and perform probabilistic inference with hard or soft evidence
- Learn network structure and parameters from data using the library's training capabilities
- Diagnose faults or predict outcomes in systems where uncertainty and conditional dependencies matter
- Visualize probabilistic graphical models and export them to standard formats for sharing or downstream analysis
- Integrate probabilistic reasoning into financial, insurance, or risk-assessment applications
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pyAgrum is a Python library for creating, learning, and performing inference on Bayesian Networks and other Probabilistic Graphical Models, with a C++ backend and high-level Python interface.
Yes, if you need Bayesian Networks or probabilistic graphical models in Python. Active maintenance, no known vulnerabilities, dual licensing (LGPL/MIT) gives flexibility, and broad platform support. Caveat: this is a nightly build (released today), so verify stability for your use case; production users may prefer the stable release track.
Install
pyagrum-nightly on PyPI
pip
pip install pyagrum-nightlyuv
uv add pyagrum-nightlypoetry
poetry add pyagrum-nightlyInstalling pyAgrum-nightly
Before you install
Medium install friction due to compiled wheels; nightly build released today (0 days since release). Active maintenance status. Requires Python 3.10 or later. Pre-built wheels available for macOS (x86_64, arm64), Linux (x86_64, aarch64), and Windows.
License in practice
Dual-licensed under LGPLv3 and MIT at your choice. License treatment marked unclear in metadata, but description states you can integrate into your software under either license or both. No GPL contamination if you use only the pyAgrum interface, not native third-party interfaces.
Quickstart
pip install pyagrum-nightly
import pyagrum as gum
bn = gum.fastBN("w<-r<-c{Yes|No}->s->w")
bn.cpt("c").fillWith([0.5, 0.5])
ie = gum.LazyPropagation(bn)
ie.makeInference()
print(ie.posterior("w"))
Requires Python 3.10 or later. This is a nightly build; consider testing before production deployment.
Verify before relying
- Whether the nightly build is suitable for production use or intended for testing only
- Specific performance characteristics or scalability limits for large graphical models
- Whether all four runtime dependencies (numpy, matplotlib, pydot, scikit-learn) are required or optional
Package facts
| License | LGPL-3.0-only OR MIT (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 4 — numpy, matplotlib, pydot, scikit-learn |
| Maintenance | actively maintained — 0 days since the last release |
| First released | |
| Downloads | 310,025/month — #7,749 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyagrum_nightly-3.0.0.9.dev202608141786444173-cp310-abi3-macosx_10_15_x86_64.whl; pyagrum_nightly-3.0.0.9.dev202608141786444173-cp310-abi3-macosx_11_0_arm64.whl; pyagrum_nightly-3.0.0.9.dev202608141786444173-cp310-abi3-manylinux2014_aarch64.whl; pyagrum_nightly-3.0.0.9.dev202608141786444173-cp310-abi3-manylinux2014_x86_64.whl; pyagrum_nightly-3.0.0.9.dev202608141786444173-cp310-abi3-win_amd64.whl
Keywords: probabilities, probabilistic-graphical-models, inference, diagnosis
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pgmpypgmpy provides data structures and algorithms…
unclear · top 5,000 on PyPI
problogProbLog is a probabilistic logic programming…
permissive · top 15,000 on PyPI
pymc3PyMC3 is a Python package for Bayesian…
permissive · top 15,000 on PyPI
pymcPyMC is a Python package for Bayesian…
permissive · top 5,000 on PyPI
pyro-pplPyro is a deep probabilistic programming…
permissive · top 5,000 on PyPI
pyjptpyjpt learns and reasons about joint…
unclear · top 15,000 on PyPI
botorchBoTorch provides a modular, PyTorch-based…
permissive · top 5,000 on PyPI
tensorflow-probabilityTensorFlow Probability provides probabilistic…
permissive · top 5,000 on PyPI