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.17.2.dev202412241731932516

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.17.2.dev202412241731932516
File
pyAgrum_nightly-1.17.2.dev202412241731932516-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp312-cp312-manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp312-cp312-manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp312-cp312-macosx_10_9_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.9+ x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp310-cp310-manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
pyAgrum_nightly-1.17.2.dev202412241731932516-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 79.5 MB

Release files / pyAgrum_nightly-1.17.2.dev202412241731932516-cp313-cp313-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-cp313-cp313-macosx_11_0_arm64.whl
Size 4.3 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
23e5eb0b09643add7621dbd31d14c899b7c3d977a1bdeb0f688ed012fbaf883b
BLAKE2b-256 checksum
How to use checksums
bc1355f8627ed33075c9b59d3789564cf36cfd2baf5ec4fd7f479a1c7115ac7d
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.17.2.dev202412241731932516-cp313-cp313-macosx_10_13_x86_64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-cp313-cp313-macosx_10_13_x86_64.whl
Size 4.8 MB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
b472987fc9f40f107807a52b3e7aeba02fd1f5864f817b2cd1d73193d16ddbfc
BLAKE2b-256 checksum
How to use checksums
82b8ace9a008a32498e85ee2e137cfd8f98c052b5007581e71516591e08c70dc
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.17.2.dev202412241731932516-cp312-cp312-win_amd64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-cp312-cp312-win_amd64.whl
Size 2.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4f774d9e98713303d296b95b7977b353c6b7101526952fdfb7663427bde0d9a6
BLAKE2b-256 checksum
How to use checksums
3c980ba07b3a05ab94d99fd4776424b6d8acfabf999e35889cf9cc2365ed0e17
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.17.2.dev202412241731932516-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
b51b42cdea648ec720e1b26863ee253a7993acbd631fc858331ca50394d4a060
BLAKE2b-256 checksum
How to use checksums
d5d2c505ec643da76d400b21d300b2140aa701ed6d84c97e18c4135b8cef0a68
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.17.2.dev202412241731932516-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
919aa2f6c350183dfeed4f8eccd45ffc5d82169e0eacf6cc033001ad80e5d7a1
BLAKE2b-256 checksum
How to use checksums
ba2ffcc1224727f0f464db725f12a99a48b79c8f6f39279c4eb67b08299ac34d
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.17.2.dev202412241731932516-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
74cee2518738e1bc967d0f4785be3ecca0313bae0084daaf3942bde80be727bc
BLAKE2b-256 checksum
How to use checksums
a0dd35414293741ef01bbb0884d1a0dc600a3552828ba66202e1c8f2b2c2a36c
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.17.2.dev202412241731932516-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
fe308380bbb03a62239696bea7e744f5f06280bdad996813d9be024d2d29ad49
BLAKE2b-256 checksum
How to use checksums
51a257307738aca7ffc6e8e5e26ef49d7dcf35d277612d217c0cab4b0b86600f
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.17.2.dev202412241731932516-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-cp311-cp311-win_amd64.whl
Size 2.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
4c9b09973f72e75dc69daa09370306e8756c3546f03fe7183e7d2832d4e65e42
BLAKE2b-256 checksum
How to use checksums
1e2e25a1f844b882f6e13617b27b63f87444334bddebfd2e84e4e220e77fde43
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.17.2.dev202412241731932516-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
5eb464170bc550eeb433d154b80277b9c8c8cdce538ea3465034dfc275f4a0f3
BLAKE2b-256 checksum
How to use checksums
e62b7361640ad67f35364b8348afaa62cf547068509390adde0055db40571cc0
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.17.2.dev202412241731932516-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
54b3ecf0ca88f6bef4d93bdae46919d5a0c9bee18ce2729797af2738d889fe35
BLAKE2b-256 checksum
How to use checksums
9fc1d4e41f32a58994e356dcc276b911213b479afd14014f4bc8081e731a2ce7
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.17.2.dev202412241731932516-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
26f4dd22e1e59e35589da1c2e37e31b69017e6c1b2463d958e629463cfb4961e
BLAKE2b-256 checksum
How to use checksums
4b097a67e103cc2b8d190ffc000b461bcffde28235f5e36add450c828c656fb2
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.17.2.dev202412241731932516-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
d81267815f875b2cbd3ae71735649996455116f74e86be622d77562a501297a9
BLAKE2b-256 checksum
How to use checksums
aeea89e2aff0556535b5b6037d028b8954605b19aa6c4cd7caa33ededecf9080
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.17.2.dev202412241731932516-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-cp310-cp310-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
4b895428f07378e510b4d0fd2937bbc445b906e5c1e0f0a6dae76ba140dd0738
BLAKE2b-256 checksum
How to use checksums
a5a68c4228aac5cef277dfadaa9fdc8a31d2f3f706445b214ed09b0b2259581c
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.17.2.dev202412241731932516-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
5ac4af1de7cd2508eb963bdc74c9043b65041ceeb2b679a04768fb25a9d7f196
BLAKE2b-256 checksum
How to use checksums
8c2f777de1325368c2946a84402e4348df5639e5f21336449f4fdf1e88c9ec96
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.17.2.dev202412241731932516-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
75a432fe7209242df29b606a4b48d3b9e1142dabfde022ced1a0e56ee9ee6d77
BLAKE2b-256 checksum
How to use checksums
8bdd4888509209f90bf6ad625e1924aab87fd8e7281d6965610925ded1cc790d
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.17.2.dev202412241731932516-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
7d6a27031b88a3934f419c0c079f2a87078d8bb4f6a98f56bf0481fc0791b2f5
BLAKE2b-256 checksum
How to use checksums
3aa7912b0df18a0099d206547488cc27bedbc894e987ec95138c6b8b9edc5253
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.17.2.dev202412241731932516-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.17.2.dev202412241731932516-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
7c4a3bf8c2c71768942374063d345c22d25b75a521769a7f04dae23e02398e9b
BLAKE2b-256 checksum
How to use checksums
2fad5d6e400db2f595bbda81521bdbba20d3f9edd334843479e530d574c30e41
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