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

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

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-cp312-cp312-win_amd64.whl
Size 2.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
a5b906cf78eb5bf390c78fb19a0515bebd83dac9c06b5608086063ffe403cf2e
BLAKE2b-256 checksum
How to use checksums
768e2b6ebe7bfa1ed8565a19a56f8fbdb313efb5e2bbc72a0539e667e63131ec
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.dev202409271723794729-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
02e84a2cbe4f4e7487ed2cec554960aca487e620a87fcb7a82c7853ee0a3c431
BLAKE2b-256 checksum
How to use checksums
2a411945fc43038363f8e15a268ae6308095da7e4a51319d4c8ee2b4cd5396de
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.dev202409271723794729-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
2ab9c891d8e9f0dd053c4e06af69683ad8b67ce309a84a1729670796e551debe
BLAKE2b-256 checksum
How to use checksums
a966d28b658cddf779ff8da5775026eec6d52bc2a0400dd7dca71502223b4f57
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.dev202409271723794729-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
a47e85ff55968577bba0555fe5bcd41e6da2eb180a0380923443ad4eb9e7a038
BLAKE2b-256 checksum
How to use checksums
cb2869139c2608a3c9428c9bf15fa88ed6234c4c86bc76faa1d393a22c0a432b
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.dev202409271723794729-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
b85016a105699ba5d08b529def1830c49950ff354c973a4726d43f70a8dfb0e7
BLAKE2b-256 checksum
How to use checksums
7e09f5f6e7fbfdaa78eaefbe39a0aadab0e7ecee43d8ee2b3ff1c583584f8d51
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.dev202409271723794729-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-cp311-cp311-win_amd64.whl
Size 2.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
93ae678667771ca263524d32cc19ffa8c39d93b8e31d4296e386d9f1150eec3c
BLAKE2b-256 checksum
How to use checksums
01ee010d369f450f2913d6f753cb15eaadf0bc34ee2a982e81a711607cbccd0a
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.dev202409271723794729-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
71be78dc9aa2cf975aec6fc468098202dcb1d46950444bbf7f24c0f56f2764f6
BLAKE2b-256 checksum
How to use checksums
f22b6845927cd8c434da21a96a6b7a401016d32515777c5ebff4bd553666e75d
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.dev202409271723794729-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
e030ab0fc976c31fe5b0ac9f9ad175d24e3eca591374e406017608087db8a69d
BLAKE2b-256 checksum
How to use checksums
66b779d6ee1f220f8b7b13a83a60fc24916736bb1ccc2410767a13273de07828
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.dev202409271723794729-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
57f3a7b62933a262cfcaa67eaaae40bea5a0c8a0e052395c876121c01b04b7fa
BLAKE2b-256 checksum
How to use checksums
e2f74374bc0ac6d92722bb59ccc648bb0eade539032b40dd58290f04b60f6942
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.dev202409271723794729-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
26f8626e98d76989da8e63d4ff7f28d610f203e35fe2385ed33aa055cf8c212e
BLAKE2b-256 checksum
How to use checksums
dc5fe42019506ffa07da799fd44ec5af935c325bb915ab3640d50c700b7ed96a
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.dev202409271723794729-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-cp310-cp310-win_amd64.whl
Size 2.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e8dddd4b0b13e3fa3137d54cc9916d0060de7f40e1f22840f49419c96aa9d475
BLAKE2b-256 checksum
How to use checksums
43327d795146ccea26ec52095c61ec3c93074fce644ca44bfbead734d5955833
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.dev202409271723794729-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
00a25542f84bb876b702442c7a40127673f415e23dac77d8abb9c7b359beaf51
BLAKE2b-256 checksum
How to use checksums
7baa925a2a31ed984f55d45cea730bec5b243b07fdb80c1ab7be5e3ecc1ce0f5
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.dev202409271723794729-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
ee1c3c0b166811d89a2fec1bd1a77f8cc75a16bf4bf3203b360ea4765045e6fc
BLAKE2b-256 checksum
How to use checksums
2e95ccd93964cdfc178094196447926ff13489a0f558100f825493fa53cb82a5
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.dev202409271723794729-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
ba517e57e37d3ac49a67ca30bce2f7dcfa24e3cbb95014b3edb93c584dbfb5f4
BLAKE2b-256 checksum
How to use checksums
759da899c512ad5b029900f6c3743e9b646782653f7ecdd0aa771152abe8e7fa
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.dev202409271723794729-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409271723794729-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
9cb816aaf39ce72893d7c761b67d67cc3299384a0f2212beca846a75fe2630ef
BLAKE2b-256 checksum
How to use checksums
6b418e1e9183506217339d97a17ca086ee527f1a1fffdbad52a6c467ff7e2e35
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