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

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

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-cp312-cp312-win_amd64.whl
Size 2.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
92bfaa0bf38fade3aa42c9c0e66ff23c8d068ea57c73882eed8c4e20adb7b4aa
BLAKE2b-256 checksum
How to use checksums
4af029016cbd5538b4257e1b7d3d07712dec9951c1a1afc2e5c31c387043106d
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.dev202409281723794729-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
c692224217481201164585488199d511fc7acf41fdacecb2757109757403c46c
BLAKE2b-256 checksum
How to use checksums
ef8f80788b38b526328a487c3c27835a2e9731a2d1ec75379bd64fe0c9ebe9c2
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.dev202409281723794729-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
64ceeb3fb2d154051b34cb5a2f7117776bc5554ffbeb27d4847061368568f614
BLAKE2b-256 checksum
How to use checksums
9c9fb9935dda68306f9b773feaf00dcb2c3fb873b90fac54cc1609d27916aaaf
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.dev202409281723794729-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
9733a87867349ddd0391bfe1ed2035242e2646a37160d2e797eae8245745c8af
BLAKE2b-256 checksum
How to use checksums
44f0ed13280150336fbaa2cd528a2471f2890a924719748130ef5b148bad4f07
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.dev202409281723794729-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
f830027c2a22127e6637c9c7553f37173ec3bf414d234407bb4ecd4bf9029b42
BLAKE2b-256 checksum
How to use checksums
a552df7646bc9a99464a0f565b67450734bf54c08b48aa3c99e6e27242590623
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.dev202409281723794729-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-cp311-cp311-win_amd64.whl
Size 2.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5bdf45e8199ad288a75b498f623aaba3c581b925d73be20b4835644ce7240917
BLAKE2b-256 checksum
How to use checksums
af4b58497a0ae360e289f38bfdb91fe9c5ca7f8aa202824409f976a6395cbfcd
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.dev202409281723794729-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
aafb2262dd7f73fcce97f43f7754336a7a3ac77677fe54be1128cffbaf59360f
BLAKE2b-256 checksum
How to use checksums
17474f21fac70ffa4f5ba59587cb4cbe07b1973dc3e44697f6eeea7e48ca35ea
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.dev202409281723794729-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
b50301d948b952f7bd7fe663a524feb24ab0490889fe4ea37dc4c9c38a286eec
BLAKE2b-256 checksum
How to use checksums
bd514f0a15cae6e3e50183637c0ceaa98beae65c4a0d97331a2f0ee9277e27c6
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.dev202409281723794729-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
6197d3f60a80bf8687ccc64f38c664090ec0a838d45f83b027a02d11ea11dd13
BLAKE2b-256 checksum
How to use checksums
423dd0752e7406fad2356058c5c593cd49e6477184247902f7102e638eb8a198
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.dev202409281723794729-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
a5cc0bb17cdd162dc3dc0f987d95ef8d3f8ff017f296bbdb15c18f61bbe4ad9d
BLAKE2b-256 checksum
How to use checksums
ebe86502d794c9b16da90cca469f2e80eca2417444961525d454650ef6cfd783
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.dev202409281723794729-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-cp310-cp310-win_amd64.whl
Size 2.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
6b780e960036457c53fbd793ac675af88bc1e6c04b8be8d2b859d369bebebfac
BLAKE2b-256 checksum
How to use checksums
5fd60003820dd40612401fc40fd67cfc2a6ba2eaf0facaabde42cff57f609f2f
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.dev202409281723794729-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
5a0d0bc1db741f4465443bf957d6ab140d0ad13022dc6fb8f268d587916ff4ef
BLAKE2b-256 checksum
How to use checksums
c048d67ca6bad951017a7e12421fa592c834440eb2860a73806f4474cf04f5cc
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.dev202409281723794729-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
40b63e21e5721e6aca03a9b510b6a34a277154811a6ea38e52923ff7f74155cf
BLAKE2b-256 checksum
How to use checksums
84715ead239dac4394dcf17cde4e3386bf83430b13841691a36a74711b6c6b0f
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.dev202409281723794729-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
5695deb3421a090fd6297950e15a0c3d54aa175f264a748dfd52c6a3e7050078
BLAKE2b-256 checksum
How to use checksums
7e2209208d3d7c3363e423460c84265a3aef7589effd201c8a05c9b2ef467e64
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.dev202409281723794729-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409281723794729-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
4dddbbcdc16d03adc31edeb433d821236377041c4d1db7ffd328be19ef3ff34d
BLAKE2b-256 checksum
How to use checksums
8af4af7ae773d39b8d81eb86ae5a6c7ae6b4ae735b6596c391f5bd263b641331
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