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

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

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

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
ecad90b93ac5f4f9f9e966bc9f76fb445e0f128946085452b03c0512061eb93e
BLAKE2b-256 checksum
How to use checksums
165e53ad8df263b36555997b4fd040e97c4a0889af3926bdcbb4164df4d19c5f
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.dev202410011727562243-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
d46daf454486410e480d0322efbf1d13bacd254e669b7fca77278c72701cd918
BLAKE2b-256 checksum
How to use checksums
2200bccc1396bb36e81180d7cf450c598873756f28eedf264df188de48517c53
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.dev202410011727562243-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
bf8312168b50a16f2f3c04bf78ce03a10fd38e3ed7875af5269dfabfe8b61139
BLAKE2b-256 checksum
How to use checksums
22a972d03df5956cee47704713912e1b14a973b055bedd9be7db8369fc223169
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.dev202410011727562243-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
9228a7c777e8f95d3780309169c8f3b356ea33039b6d2d744369d64c1c6d66ce
BLAKE2b-256 checksum
How to use checksums
b72faef65236e04bbb10ccf770ea7bc3f565be52130084df9eeb44a8ad0f11eb
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.dev202410011727562243-cp311-cp311-win_amd64.whl

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

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
09627cbd151ba8b9a1009f86cbd5edff070e5a805982bb4399fa331bd28d63c2
BLAKE2b-256 checksum
How to use checksums
b72fa5ddc7e0598f027abc0becb533c718cf46d6922548d943464155ebc4e01e
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.dev202410011727562243-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
223f764e09e8ea46dd16be94065182a60b619f2bfa6a8b302ea45fbbfcfe9f2a
BLAKE2b-256 checksum
How to use checksums
398cf429abc1a8988cfe04e7cd3d22190c14e085946b58ffc235bfe0a0566d34
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.dev202410011727562243-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
ed35890f0686f8e4e29ed62d594adfa77b3bde699ef6b6e3bf31f0e5929e664c
BLAKE2b-256 checksum
How to use checksums
3db6b0b282a917ef84b74cb9433f4cfc5d606fe467fe24a7ebcb4d6036287f6c
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.dev202410011727562243-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
7eee319ee205f0c5dfc1f6a0eb80cbb68d400d6a3f452ed663f9434beab454e4
BLAKE2b-256 checksum
How to use checksums
7f16bfa648f7415fbe16b0dfffa69fa19735afc296edf8f4687c859b3215b293
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.dev202410011727562243-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-cp310-cp310-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
97c95f039bafd323d3c1ba169367038b0d31fb38ec3c3d23a30e1bc97776f81f
BLAKE2b-256 checksum
How to use checksums
9c0a770daf3d07b6e5eabe7347439d38601cbc788c925d96c60a8a58d83e6947
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.dev202410011727562243-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
df4d1cf46ae4a45de5e4a3042f5667b6771ffc0df6d02147513fe940f5135efe
BLAKE2b-256 checksum
How to use checksums
e067e38922aec81b743fa6dd4e6cbbb0283851a1a37c0bcef706e6b131d540df
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.dev202410011727562243-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
259cb2778eed95c22b416efcfbd9cd88b617f35b60647bd597e55b3f17a77481
BLAKE2b-256 checksum
How to use checksums
0cfe7955437d31c7750e983b1c01103f335bd2865dce1991bd7e77da4b4894f6
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.dev202410011727562243-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
e43b0c4353821c8a7af6c15517a3949c916eb7a865a5b3d63fdc3bc66b8e0675
BLAKE2b-256 checksum
How to use checksums
88fca70c3adc16e5914215a9d35f6a837db83cc5106f7ab01740981c52bf5a6e
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.dev202410011727562243-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410011727562243-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
f7592f67ca6eec53e058f60b78edc9cc0377405922068dad72ce0f73972fb561
BLAKE2b-256 checksum
How to use checksums
dd8436839690789ef97c4dc907bab24a11f94e6050890095e8b626c44d99b9f4
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