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

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

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-cp312-cp312-win_amd64.whl
Size 2.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
974a14748d267c1e3408de7e3203a596af43d7b68abaa01aa8b86bf9f514eb4b
BLAKE2b-256 checksum
How to use checksums
146dd764cff8aedaab23b8d6d02c037c7007d6760f5d4b8ad436a648fbccbbf7
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.dev202410071727562243-cp312-cp312-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
ab33b5d02cc616a8c58aa29b87b697059ba6ae0d40d9794404eeef33b5b80408
BLAKE2b-256 checksum
How to use checksums
9335cea75f6aefeaeddf38f33256e3754ae647b99a0409fe0fffac8e8c72131c
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.dev202410071727562243-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
9e8214dfce5bfb1cb34c7d23fcac6397ebb3086debca122b224b3825e0a02003
BLAKE2b-256 checksum
How to use checksums
6f25e73503e7b4df0e71827872a8bdd19d1ea28debb407da0345687d6c005787
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.dev202410071727562243-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
f1785c7f5df4032cb53595fa123135e6be0a86634233705bd8870830fd83ec09
BLAKE2b-256 checksum
How to use checksums
87ff05e4790f5187359004f9b7b031dc28a66778b7ab4cb71cd9d88a26d528e3
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.dev202410071727562243-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
e145fcf57d5c06027bf5a7004f14937786c85d956e45c7f9b12f4b087dbf8829
BLAKE2b-256 checksum
How to use checksums
d925bfd61a401e404f505a946bcb3fbf4a690fd3cd9b36f72f526293373a7a3f
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.dev202410071727562243-cp311-cp311-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-cp311-cp311-win_amd64.whl
Size 2.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
8c80ee789ac3704857cde34d6a39623b73d2f29a59534db0fdacf802552a6496
BLAKE2b-256 checksum
How to use checksums
653988513506b3e76c69f1b925c8ddc44a43bb610e3c92c52b0bc3a75de58fa6
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.dev202410071727562243-cp311-cp311-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
eb3e55eef4a4cad02060b30d52c68fd9ff3baaee0ca878762b07332600709e81
BLAKE2b-256 checksum
How to use checksums
05fa0596d77569d60088b58b5f7c6b00f60719583b5c98012232e8062d1b7c78
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.dev202410071727562243-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
2fbedcb9a471b62975526231e0bc107ae99844688683f4696c76f80a27e3a11c
BLAKE2b-256 checksum
How to use checksums
056366fb3eff83e4319567c3fe9c03b30d993972e5dd0a1a22a67c542f993801
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.dev202410071727562243-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
11ee6dd20c107974db7707b548254fc73a5e524eb657c7d0ce62ab923335b769
BLAKE2b-256 checksum
How to use checksums
7a2fe5f4e187793b5f2f92224174dd9a28b23b6795ed2517cdd7c403f3dfccca
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.dev202410071727562243-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
ada4083821eb15689c2c9801f1756aa12205342969c3358cdca697dc2ca2016c
BLAKE2b-256 checksum
How to use checksums
d1db9dbdbfc55af22295e7b2cf4fabf4b4c0f19ece3a72d733dff035459eb87b
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.dev202410071727562243-cp310-cp310-win_amd64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-cp310-cp310-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
db7c44ee1377950c4fee6df47d67d7ead2aba27a0293b3e5760ef0ab25946ca8
BLAKE2b-256 checksum
How to use checksums
3c795d44b71ee5ed1f155201076979dd1c202d1eea6e78834e28c089de8b794d
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.dev202410071727562243-cp310-cp310-manylinux2014_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
2ab1ff4a25fd090cc842bcbc3240793ad223f7f2c34087d003276af5bca3fc44
BLAKE2b-256 checksum
How to use checksums
b5551171db592665df72f0cccb5c4bd334b9346db095421511685dd1c878251e
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.dev202410071727562243-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
0faaceeff2741d9bcb228fd540292d768b13c65e7bdeb9c7b0252e470406da2f
BLAKE2b-256 checksum
How to use checksums
61111c774b40b850bc536cf51cd5c8ad63600dd35bb531646f999b781d445078
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.dev202410071727562243-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
b92807c3a7859b59dc58e92d1101aba1bbf6e658368be4ac2aee945e576ef6b3
BLAKE2b-256 checksum
How to use checksums
3912d34f5aaa8fc0236c905d0f470b52486c38d7014949bf0af714de666f4145
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.dev202410071727562243-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.16.0.dev202410071727562243-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
e16cfe1e793f8eb0efaab2888e5339b9d0f215361ad0ae287ae7bb1ad2cdff40
BLAKE2b-256 checksum
How to use checksums
8f19260f948a65cca6ad1458733f0ca23fb99c18fe1175fd219496ace5d6568a
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