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

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

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

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
0b4419244a4395153f5f3c64dc782cba3f9830375424995f6fad8a833c62a7c3
BLAKE2b-256 checksum
How to use checksums
02d23dc2ff762d41bb097f056349275114246b1df48d26df34f15714606a3f6a
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.dev202409261723794729-cp312-cp312-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
538c838bb4c52571dfcc268607c6a92b8ff268406d0a9b590fc47b0ed9ba2970
BLAKE2b-256 checksum
How to use checksums
4a16339f3d0855d7808b259927dc70ae5c9f910e86ffecc1d54843bad8e91316
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.dev202409261723794729-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
beec8a0daa5a940f6981bf7fc406e02e1a2f087895cef0b024c1bb6a45e644af
BLAKE2b-256 checksum
How to use checksums
dc1e1332e0f6f378ba1cac048d7ec15fc8d4cb907ea2402e0be0bdd523b86da9
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.dev202409261723794729-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
8817201e14c26fd59a69f4cfc4bf75bd440f7e38e73169e32552e5cf8525a75a
BLAKE2b-256 checksum
How to use checksums
20d413cb0212b830bf85f7e42e1267b949225a79932f6ca1e7b64c04536f1cf7
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.dev202409261723794729-cp311-cp311-win_amd64.whl

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

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
bad49c7c4b394ba0c7345914a75b3fbe0702ec80b6310a67be9ecedbfeace32b
BLAKE2b-256 checksum
How to use checksums
d4193564e62c99c3fb28cf562c2d8cd2b8da46a3b113b5799c71106ccc27cd27
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.dev202409261723794729-cp311-cp311-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
0d7fb554541e2cd0931d992e3b8d0655ef64f99100991bfde4bace2d00567fbd
BLAKE2b-256 checksum
How to use checksums
4251d095d0486b337dd58c429f29995a50e499686c908da372a8aa89efb3f06b
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.dev202409261723794729-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
7e57e8497985b61bb373fa1a801f4f26511f21843992894544613882e62100d7
BLAKE2b-256 checksum
How to use checksums
695d1e9555a480fa99044c7a7f94f80af5f108600e1486334b4045f2f3117220
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.dev202409261723794729-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
5138617006a39a900d738b88fa2270e0ab904446eaff67f4f68ebe70065de96a
BLAKE2b-256 checksum
How to use checksums
f35a9b67c5142b0d189a8651d02584255ec7e7901a7298d72a79f7777570141f
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.dev202409261723794729-cp310-cp310-win_amd64.whl

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

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
c50577ace3cede6e3860774e4fec2f5d25a79c9ccd3c9b6dd8df47b19214b890
BLAKE2b-256 checksum
How to use checksums
c78991d00dc810bc269d0e1dfb960cc55c56f3ee60dfd7bf55db047b3949306b
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.dev202409261723794729-cp310-cp310-manylinux2014_aarch64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
ffb83a6904eb8614a26550a6ec1d0c59e49e13fce772260c1c139c98ce6e25ac
BLAKE2b-256 checksum
How to use checksums
3072136aec57dd98074da7ad7af4975ebf11bde69dcf457ee2bf25ffd36c2e63
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.dev202409261723794729-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
12145673007af48c0e8dfb4e78255e6fd5ece5f082a6c2155bf197f4fc2cb63b
BLAKE2b-256 checksum
How to use checksums
bec6d2203789a40cff40970c9162a9f564c799d5df062bcc69d717b2ef11e426
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.dev202409261723794729-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pyAgrum_nightly-1.15.1.9.dev202409261723794729-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
6e77707de20bcc17731aa857091875d8f236700ec0cc2585e3aa6dcb11bea00c
BLAKE2b-256 checksum
How to use checksums
e4da81f2ecd00f6b48f5b0b9690a24ef4a9c643580fbe5eb6e1f6a7eb3897a2e
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