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.15.1.9.dev202409291723794729

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

Total release size: 69.5 MB

Release files / pyAgrum_nightly-1.15.1.9.dev202409291723794729-cp312-cp312-win_amd64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-cp312-cp312-win_amd64.whl
Size 2.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8aa87c8c6a37e60a61244e544c658e7b8b4ef7734c8b14a9dd6b8c974e322aa0
BLAKE2b-256 checksum
How to use checksums
64000da1563cb63e16aa0db5c3a322973a3a6b32ca17d910f22edb42173a059c
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.15.1.9.dev202409291723794729-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-cp312-cp312-manylinux2014_x86_64.whl
Size 5.9 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d382a95d91d40920bf060642802447386c6227325af79b978b4d2d2a4116b270
BLAKE2b-256 checksum
How to use checksums
f9f14a487d5f50143e0f22d4949f751b2c39787ca6289c368172f9bf1a852850
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.15.1.9.dev202409291723794729-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
fda75858af005f20e96114295fe1ea9e31520a6ab0d6b0813a8aec6479746b2e
BLAKE2b-256 checksum
How to use checksums
768a6418911f74d404a3a8df56dcbffafe8498ef7be8ebb407e5a7d70a58e5de
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.15.1.9.dev202409291723794729-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
c9142248734e1690bd5895384394076e1fc369ffb3bf5ecc7bea7cdc99bb2921
BLAKE2b-256 checksum
How to use checksums
f818142eb5af427184fc189002d1f33a062ffb81a5e8d144ead4007ea5ec49ff
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.15.1.9.dev202409291723794729-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
293cc54982ba9700fc6a31dc02a90fc24a9edaa865cb330fdd768e4ba54f8168
BLAKE2b-256 checksum
How to use checksums
c0fb5b0455bb3523912feabd795e6f4b7ca015a289c36ecb8fd09f2dfa770a95
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.15.1.9.dev202409291723794729-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-cp311-cp311-win_amd64.whl
Size 2.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
310d4334f1fb72f968ada7ca051834bff11d462beb98adb7dfcf24f46789c42e
BLAKE2b-256 checksum
How to use checksums
71b864d597544b34271dd24ee29e50aa92a8aec63a50e0215f7be83697ab22d2
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.15.1.9.dev202409291723794729-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-cp311-cp311-manylinux2014_x86_64.whl
Size 5.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
767214a6bfd62e5d35219da69908a4b325c76e793d468a05cbc2f491b507187a
BLAKE2b-256 checksum
How to use checksums
0cc5d47ecc7269ec1b4d88e1bada8f1b333715d5b06999cf394d5cc2a256c69e
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.15.1.9.dev202409291723794729-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
f4249d2053f9d7d1a75de0c073aa4dbef75e14ecc1b285a5aaa9e0764faee8e9
BLAKE2b-256 checksum
How to use checksums
7f3b5fbd5d0c4a831a3a0b3929cf62903c5b3f555d443ce68323853cdb5189bf
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.15.1.9.dev202409291723794729-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
29a6d8e4d220fc0d79e39bc3b823a0c4072074a6c35f5ce56e51b3a3ddfea9b5
BLAKE2b-256 checksum
How to use checksums
13c41fe0d21db38c3fbcbd1ffcdd955a3253e0a759af7ca9f43b50bd419bf86b
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.15.1.9.dev202409291723794729-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
0dbc41e1571308565eb0c3af7560845331dde0c75a14b96edce3b6a41fdfa967
BLAKE2b-256 checksum
How to use checksums
34cb23fcc8f12b3fd33fe85ffecc8260b5b4ec1427ad2bc2c83e2d495547ec1e
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.15.1.9.dev202409291723794729-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-cp310-cp310-win_amd64.whl
Size 2.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
4da70af3f2f440befaeb5e3d37adf806868c6e06241ec3584ba6513c27beb37e
BLAKE2b-256 checksum
How to use checksums
3dad7dfa15346ac23edca359e3d795a1f2cad06ab38d5a1001741071d3be3ed2
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.15.1.9.dev202409291723794729-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-cp310-cp310-manylinux2014_x86_64.whl
Size 5.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
2e6e0aa56a87e3d5385327ca3552f68430c629ac8d45c30e06fcb8dc7d11e136
BLAKE2b-256 checksum
How to use checksums
be79eb428723022d0e1e1cc9ebbebf4a630cd4440326f72f7ea4c6aa46836a34
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.15.1.9.dev202409291723794729-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
741a0b198563fa089620a34807bbdef2d005f3e4a5fc9c3b79e7924da141497f
BLAKE2b-256 checksum
How to use checksums
f7532b971f38f9764aef166d831cde94c23f13793e792136938b71fec6203a23
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.15.1.9.dev202409291723794729-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
f0c961365971dc86eedcfe032d8ac4b4bd0856756504ae01fb5d0c4ec26fb44e
BLAKE2b-256 checksum
How to use checksums
e07f97a413003e88735147f2c9e31ec7fb29754768309ea60587817034ad0d2c
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.15.1.9.dev202409291723794729-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409291723794729-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
5f5898972b5b8ec8ab8c1c3619d95c5dd0ebb4cb708b0bcea346230d1fc907ce
BLAKE2b-256 checksum
How to use checksums
fa15f2e9dca4860ee3c584420cf75648a172a686996c7eac948c3599da703c69
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