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

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

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-cp312-cp312-win_amd64.whl
Size 2.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
99b0de4fb61139eef9c4adb81131cc6c6ba53a3d39fc5073a32b7de788ecfd4a
BLAKE2b-256 checksum
How to use checksums
74cf188a02dfe4783095dc8761120dd9f14d2462957d175565866c63a86aff6c
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.dev202410041727562243-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
1dc3e89baa78c7df572c893481e56d609cb3acb0781e228d660a1378cbef2390
BLAKE2b-256 checksum
How to use checksums
56777b326a793d880fcddde6d8b5dde9e74f3b7501d08a148a0abb2760b5364a
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.dev202410041727562243-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
71efe2f7650957799cbc6951aad20437737cf93aa481842bd3d0d5145e562297
BLAKE2b-256 checksum
How to use checksums
443b79ab6313b32a194f1a93b6a157b87523c256052a299da8ddc46fd775a958
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.dev202410041727562243-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
af3cdd004600be513395e652acc1478b5d53d56fe7d0536eeebc8a6dfe32a26d
BLAKE2b-256 checksum
How to use checksums
5dbc0e931bc10d11efc3ad50a83c1a0a48c0889e3bb87446b9aa5fefcc597bc8
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.dev202410041727562243-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
e6616607ad0364dfd2dce1d041a2ec802b5ac19a102ff4c480e814de319afb82
BLAKE2b-256 checksum
How to use checksums
92362294158343abff8766d62778a1f5d15199d4a646ede47de5488ec89331ce
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.dev202410041727562243-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-cp311-cp311-win_amd64.whl
Size 2.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2bdd6c4ed2d1e8fec77209d5c139dfddca52fe1144994c3598974c93d0912a4e
BLAKE2b-256 checksum
How to use checksums
3534c7811e66ba7b06b8dc8b960b524994b62a9d9e114835ab7a788dd2b92099
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.dev202410041727562243-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
231f3340e676d4316ccfc2a366eb912ab645474baa104001f9bffd1abe707847
BLAKE2b-256 checksum
How to use checksums
6e2552ac98966326d2df1b616a034734ef44fc8069777bba6114fcff07169825
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.dev202410041727562243-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
8522756a994bf183dfd3bee02ab056a4bd44eb07e85073fee660c9bf2932032a
BLAKE2b-256 checksum
How to use checksums
78a37edbc04bdc55ce5d44ab76d31e208f1e52aac94706b22026fca937e24385
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.dev202410041727562243-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
a42bd8ffab55ce0983dda25fba90e54bd736fe5c4057793d26032e177c9696bd
BLAKE2b-256 checksum
How to use checksums
b61ce1326fb928ec544392e4345cbd3380487c187e04ddafa01d3dc721883df0
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.dev202410041727562243-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
c3ce38acea7db78b073b6445170fc7467a64443f847ef8b764f4caa843ab865c
BLAKE2b-256 checksum
How to use checksums
f0573e8c85f4c2419fa4f431d7f80551aac7e7a1cb7c551bb749c1bbc605f354
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.dev202410041727562243-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-cp310-cp310-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
79b2562ec640ab03437978453fe93d9e4635dc329a4cf863264489f0377452c2
BLAKE2b-256 checksum
How to use checksums
91c348901507ac4dbe9aa8a8c146076f81294bdd46996d0f258c81761dc0ee0b
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.dev202410041727562243-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
b49c2a22837f982ca05436f0f914067f4911ddb3178573111576aecbaa8038c1
BLAKE2b-256 checksum
How to use checksums
3ada8eb012411532ec2feac51774b89d853546cd5cfb6c99fd8869d8aa25e79f
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.dev202410041727562243-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
cce393dc4247d99027a6eb151d639da7aa8fda1513815807b6f40afdcc7a0afe
BLAKE2b-256 checksum
How to use checksums
8671e106ebd1dababa78848e78b8f382b88089b1ba52e2bc010c6ae954f2f57f
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.dev202410041727562243-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
ba16f84a3b6863badca2c7cfb3e382253c91d9d72e9bcc2340fa0d6803ad7397
BLAKE2b-256 checksum
How to use checksums
67b9ddfb9e81d8f4379c56a100d5ba4e86bacacdc5cb2f2b43791673bea7a45d
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.dev202410041727562243-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410041727562243-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
0aae101a121e21835786f3e9c4eb65a17ebd53049f6de427461741eb249dd836
BLAKE2b-256 checksum
How to use checksums
f1fa21190363df91323b38f6a53ce10ab6c0930e7367935a6c79bab3d5db2e87
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