Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pyAgrum

pyAgrum is a scientific C++ and Python library dedicated to Bayesian Networks and other Probabilistic Graphical Models. It provides a high-level interface to the part of aGrUM allowing to create, model, learn, use, calculate with and embed Bayesian Networks and other graphical models. Some specific (python and C++) codes are added in order to simplify and extend the aGrUM API.

Example

import pyAgrum as gum

# Creating BayesNet with 4 variables
bn=gum.BayesNet('WaterSprinkler')
print(bn)

# Adding nodes the long way
c=bn.add(gum.LabelizedVariable('c','cloudy ?',["Yes","No"]))
print(c)

# Adding nodes the short way
s, r, w = [ bn.add(name, 2) for name in "srw" ]
print (s,r,w)
print (bn)

# Addings arcs c -> s, c -> r, s -> w, r -> w
bn.addArc(c,s)
for link in [(c,r),(s,w),(r,w)]:
bn.addArc(*link)
print(bn)

# or, equivalenlty, creating the BN with 4 variables, and the arcs in one line
bn=gum.fastBN("w<-r<-c{Yes|No}->s->w")

# Filling CPTs
bn.cpt("c").fillWith([0.5,0.5])
bn.cpt("s")[0,:]=0.5 # equivalent to [0.5,0.5]
bn.cpt("s")[{"c":1}]=[0.9,0.1]
bn.cpt("w")[0,0,:] = [1, 0] # r=0,s=0
bn.cpt("w")[0,1,:] = [0.1, 0.9] # r=0,s=1
bn.cpt("w")[{"r":1,"s":0}] = [0.1, 0.9] # r=1,s=0
bn.cpt("w")[1,1,:] = [0.01, 0.99] # r=1,s=1
bn.cpt("r")[{"c":0}]=[0.8,0.2]
bn.cpt("r")[{"c":1}]=[0.2,0.8]

# Saving BN as a BIF file
gum.saveBN(bn,"WaterSprinkler.bif")

# Loading BN from a BIF file
bn2=gum.loadBN("WaterSprinkler.bif")

# Inference
ie=gum.LazyPropagation(bn)
ie.makeInference()
print (ie.posterior("w"))

# Adding hard evidence
ie.setEvidence({"s": 1, "c": 0})
ie.makeInference()
print(ie.posterior("w"))

# Adding soft and hard evidence
ie.setEvidence({"s": [0.5, 1], "c": 0})
ie.makeInference()
print(ie.posterior("w"))

LICENSE

Copyright (C) 2005-2024 by Pierre-Henri WUILLEMIN et Christophe GONZALES {prenom.nom}_at_lip6.fr

The aGrUM/pyAgrum library and all its derivatives are distributed under the LGPL3 license, see https://www.gnu.org/licenses/lgpl-3.0.en.html.

Authors

  • Pierre-Henri Wuillemin

  • Christophe Gonzales

Maintainers

  • Lionel Torti

  • Gaspard Ducamp

Release files for pyAgrum-nightly 1.16.0.dev202410101727562243

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pyAgrum-nightly 1.16.0.dev202410101727562243
File
pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-macosx_10_9_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.9+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 70.2 MB

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-win_amd64.whl
Size 2.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
20af358c7ab86ff428279cac9413b0fa27c222638ffc4ce4fd50ba396573091c
BLAKE2b-256 checksum
How to use checksums
11d2bed0b40c59154edb036bb0efb8634527d3af8916f4c27e3e525c0ed005fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-manylinux2014_x86_64.whl
Size 6.0 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
08f04691ea60f9bdfd2ed9902389b87b26525bdb19efc7232bd50c2b3ebfc73b
BLAKE2b-256 checksum
How to use checksums
2cbeef4f1e8976ed4c0d349bc552cd8e83b94c062a47d2a3fdf31e381f994188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-manylinux2014_aarch64.whl
Size 5.5 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
6a11e8ff73f67711bd27569a42e13791db904880f34a7000dde280dd67236b05
BLAKE2b-256 checksum
How to use checksums
5c4d7c1b33f4b101a7e36fcaec0a09f64d2707a55d2667b608a89f94eb6888a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-macosx_11_0_arm64.whl
Size 4.3 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4eee06906ec7f36b421af2c2dc36270aafa6942a5a44b12a8b5ec587fb63942a
BLAKE2b-256 checksum
How to use checksums
a7c7e46ab2ab39b1bf2ef51727e50d7623fd218a850a344e5828fa5de5e9a0ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp312-cp312-macosx_10_9_x86_64.whl
Size 4.8 MB
Tags CPython 3.12 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
ba713c217a0206d8654f06e3bca0dce9b9dd52c4751e6f33b28877e47c29a5d4
BLAKE2b-256 checksum
How to use checksums
35457fd19746352e94ef3eab2d756015a68b612b3ef4fe6648cd9ce461daf34e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-win_amd64.whl
Size 2.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
8cf774e58433ab109e24ce9b1c27b6c0ff12d016180aca811e4807a4a027d886
BLAKE2b-256 checksum
How to use checksums
127a0e29844da5c4b1bce14e25d069c1c34bd97217ca205632bb429b57f41d59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-manylinux2014_x86_64.whl
Size 6.0 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d41152d06555edc90dde7333dd73884e331ab1b38673ef52bd52461e7d66676d
BLAKE2b-256 checksum
How to use checksums
9b9baaadd9ba4a1d23bdc08951ba8f26c585165d0316381cb6b9f4bdc9b46164
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-manylinux2014_aarch64.whl
Size 5.5 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
675d052cc2c52f16ce7d3cda6ba33f27abaef34ec86dd7b55690fc633f4dd111
BLAKE2b-256 checksum
How to use checksums
8322b1b1ada60fe7454f3fe84ee5c5ced337a2ee70391bf249cc221096312f7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-macosx_11_0_arm64.whl
Size 4.3 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
15b9960687a7dd746981d40c9fdd9bf81ac095b22c8364568bdb1eebb7df0171
BLAKE2b-256 checksum
How to use checksums
ef848c3d3a1414346b2a208717a6f9afda5f540c8acaf9d1656ee6a5b35e2f0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp311-cp311-macosx_10_9_x86_64.whl
Size 4.8 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
34bc02474c42fa2cb8a9d2392dda254048c686c3fc8c23a88e6619a9a1dc77fb
BLAKE2b-256 checksum
How to use checksums
3855e8772d09a0f3c5a50eb46c1dc5c3b82fb090d1656425deeed110f3303742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e0cae1e81c3d830c639b8a10cc485dd7e5e302c2d09270af6de2c28812330a5d
BLAKE2b-256 checksum
How to use checksums
4b7ba197418480a6bcf3aed08b6e5a1b93ff7c3514ff8add82721cc31c8e3c5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-manylinux2014_x86_64.whl
Size 6.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c85acd8197a2477d81dc65fd9df83e4a3873bf74d9c37cad5a455c298d75513c
BLAKE2b-256 checksum
How to use checksums
10ebe5232710d4f3bdd3e3acffacc812ada34a35036d8db548a40b969c225399
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-manylinux2014_aarch64.whl
Size 5.5 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
19216aed4e9784354a8af927a44806aa2fcbf39c080337e85da6b1e83a434346
BLAKE2b-256 checksum
How to use checksums
298cc8426804c9fb11b7bda037245701daf1f40b6febbd968ab989e4096e5ac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-macosx_11_0_arm64.whl
Size 4.3 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5bbd6966da6cea1d8557d380f71df687b3b0b476eeb63d99f055e68c20879789
BLAKE2b-256 checksum
How to use checksums
e9a5b535071f21ed5906cf32639bf1d61c5f0e484e419a6090395c451b33679d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release files / pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410101727562243-cp310-cp310-macosx_10_9_x86_64.whl
Size 4.8 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
c75655ee8acafc9e3c50af62168459be2781536e49e9b4f60020a57617bf6a41
BLAKE2b-256 checksum
How to use checksums
05bc32847d89502c4d2d5a059ea6eb7f50fc5cdd180cd3463041ba236308629b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/39.0.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.15rc1

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page