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.dev202410091727562243

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.dev202410091727562243
File
pyAgrum_nightly-1.16.0.dev202410091727562243-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp312-cp312-manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp312-cp312-manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-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.dev202410091727562243-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-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.dev202410091727562243-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp310-cp310-manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.16.0.dev202410091727562243-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.dev202410091727562243-cp312-cp312-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-cp312-cp312-win_amd64.whl
Size 2.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c28cdfcbfb4ec4ae5c104c96b2a6799b0ecc58fb5b40b90055d6d1dd8f285486
BLAKE2b-256 checksum
How to use checksums
22301d229f1f5ab8ea0c16b553f7496995cc85e27ecb00181bd35948885fadf9
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.dev202410091727562243-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
a7babef9de3edc4b992f3f94d6199ff03d6558d30f158bb5845524b6a1e842b1
BLAKE2b-256 checksum
How to use checksums
988dbd61c53ebbceb515672104c8df1865d01ff9ba50c2d0dd28d07e2807524c
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.dev202410091727562243-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
32e25a558ee3428aea3d5494950a4d7c87bcff5ad51f83c70df9cf9c2c8b10d6
BLAKE2b-256 checksum
How to use checksums
3ccc7e7668a0eb01670fced55aea0c2d139de5dd9c647f0a402c1a201752fdf2
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.dev202410091727562243-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
8601d7d9e5ec5ad695b51c9741a303488f5b6697d4d9a8273cf30fdaef754e84
BLAKE2b-256 checksum
How to use checksums
a1dc432f0575b191bde62627eab89f9165e03f62ec2f0aa805d5e2450047aeba
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.dev202410091727562243-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
a778ed404ccefbad8577c65d762b52894846cfae5f34c4ae7b73880711c3903f
BLAKE2b-256 checksum
How to use checksums
bed4105b5caf248321dbfb8596820c9d7f278127a32725d6abd924eb10d1eb90
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.dev202410091727562243-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-cp311-cp311-win_amd64.whl
Size 2.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
55282a71963327544329e5cc6cb321448430feb8f8ba8cf4db98d20dbfd725ea
BLAKE2b-256 checksum
How to use checksums
c96fc17824c4d3e7260b25d2828a5ccff844545df07dd82966972d8bf45cbf3b
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.dev202410091727562243-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
827752c7742246299002b492f67452519c6356fc9da01a521f4cb57617a099f3
BLAKE2b-256 checksum
How to use checksums
92033d98d840ac16799a972155416b67837e0d90de69b53618956288991a4ed4
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.dev202410091727562243-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
e38dea977b24d9bc9c86edb1d8b9ecaa1ec00f2a3db92fb5cbb5ae45e318357e
BLAKE2b-256 checksum
How to use checksums
f6578cb2824615e03ca56b69910a686744a064ac775766e24d39fc106342802e
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.dev202410091727562243-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
b16c3daa7136beabbe1eaffbc47b710b4bd2a712cecd0e07c6d30633ba733663
BLAKE2b-256 checksum
How to use checksums
e13fb8aacaa9e69e81ec99dcd127661419037dcf62277f568b86f9ea660ea72e
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.dev202410091727562243-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
8f14064c76772afcddff5ab206726e0a1bb6d3ba113ec0a1ad7468f04dc6f24b
BLAKE2b-256 checksum
How to use checksums
3a077e8765cc00457fc0b9d8c26a126c7849a3e83a4752bc03c3d85a45da779c
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.dev202410091727562243-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-cp310-cp310-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
05aaa9509fb0d07c54b7680b6f5b21cf9cb754b90c19c5f998f98434b611a301
BLAKE2b-256 checksum
How to use checksums
c81b9aae2ca892b1d5b8356f9dc9f854617b4f02e3771e8cdbf54cee2ea62169
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.dev202410091727562243-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
c3ec0fed7d2fce81e7cad8533541f0e140e54f8f2aba669e44904c8bce8bfbd9
BLAKE2b-256 checksum
How to use checksums
6447cba2325a233090f49820343d10df7f0339dd2e5a1af6b0ddf678362eeb2e
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.dev202410091727562243-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
eae91f80e041a53c53c0e0694c287aae29aa58458233783c625caabc9dca9042
BLAKE2b-256 checksum
How to use checksums
13465a21eb953c98e37bc27085c90cfcd4084e1815a79305f103eabda9d0de27
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.dev202410091727562243-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
4e67d0c2307689ee402a15063bda9d3d9f937a552854f936c6eb28ca04057d35
BLAKE2b-256 checksum
How to use checksums
6a179bdc384e85d52f05b47141a01041ba91f05a53f29e40a4171aa2e5c94279
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.dev202410091727562243-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410091727562243-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
f30de7ccb91a66d0f032b18eb95fa08c74a5c9d4d7519176756b787e8a054088
BLAKE2b-256 checksum
How to use checksums
25e6c7522ed077706aabbfa1bc9a5c29f4394d77a825507945fd07bc78fdaef3
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