aGrUM: C++ Library for Probabilistic Graphical Models

aGrUM is a C++ library for graphical models. It is designed for easily building applications using graphical models such as Bayesian networks, influence diagrams, credak networks, Markov random fields, decision trees, GAI networks, (Factored) Markov decision processes, etc.

logo
×

Features

  • Dedicated data structures
  • Lightweight directed/undirected graphs
  • Extensible multidimensional matrix
  • Bayesian Network algorithms
  • Research tools (random generation, introspection)
  • Integration tools (listeners, multiple formats)

aGrUM is (L)GPL, cross-platform (Linux, Windows, Mac), and hosted on Gitlab.

Models & Functionalities

ModelDomainFeatures
Bayesian NetworkInput/Outputbif, bifxml, dsl, net, uai, o3prm formats
Parallelized Exact InferenceVariable Elimination, Shafer-Shenoy, Lazy Propagation, Marginal & Joint Targets, Optimized Relevance Reasoning, Incremental Inference
Approximated InferenceGibbs Sampling, Weighted Sampling, Importance Sampling, Loopy Belief Propagation, Gibbs, Weighted, Importance LoopySampling
Parallelized Parameter LearningPure max-Likelihood, Laplace, Dirichlet, Multiple Score, Parametric EM for missing values
Parallelized Structural LearningScore-based: Greedy Hill-Climbing, Local Search with Tabu-list, K2; Information-based: 3off2, miic; Graphical Constraints
AlgorithmsExact & Approximated distance/divergence (KL, Bhattacharya, Hellinger), Mutual Information, Entropy, Simulation, Markov Blanket, Essential Graph
Markov NetworkInput/Outputuai
Parallelized InferenceShafer-Shenoy
Influence DiagramInput/Outputbifxml
InferenceJunction Trees
Probabilistic Relational ModelInput/OutputO3PRM language parser
Exact InferenceStructured Variable Elimination (SVE)
Credal NetworksParallelized Approximated InferenceGL2U, MC Sampling
FMDPInput-
PlanningSVI, SPUDD
Multi-Valued Decision DiagramSPUnDD

Legend: Original features in aGrUM.

Latest Releases

aGrUM/pyAgrum 2.3.2 released

  • pyAgrum
    • Fix sklearn check_X_y compatibility with mixed-type DataFrames. ...

aGrUM/pyAgrum 2.3.1 released

  • aGrUM
    • Fixed a typo in BIFXML export (thanks to Pierre-François Gimenez). ...

aGrUM/pyAgrum 2.3.0 released

  • aGrUM
    • Use of std::format` (C++20) to correctly print doubles (thanks to Christopher Eveland). ...

Installation

linux

Quick Install

Terminal window
git clone https://gitlab.com/agrumery/aGrUM.git
cd aGrUM
python act install release aGrUM --static -d INSTALL_PATH

Depending on where you want to install aGrUM, you might need to run the last command as root.

Requirements

  • C++20 compiler
  • Python>=3.10
  • Git

windows

Quick Install

  • Clone aGrUM on your computer.
  • Be sure to have CMake, Python, and MSBuild in your PATH environment variable.
  • Open a command prompt in the aGrUM root directory and run:
Terminal window
python act install release --windows=mvsc19 -d INSTALL_PATH

Requirements

  • Visual Studio 2015/17/19/22, 32 or 64 bits, or MinGW64:
Terminal window
--windows=mvsc22|mvsc22_32|mvsc19|mvsc19_32|mvsc17|mvsc17_32|mvsc15|mvsc15_32|mingw64
  • CMake
  • Python

Alternatives

You should be able to build aGrUM using the MinGW toolchain or Cygwin:

Terminal window
--windows=mingw64

macos

Homebrew

  • Install Homebrew. Be careful of the requirements (in particular, Xcode and Command Line Tools for Xcode).
  • Install needed Homebrew packages:
Terminal window
brew install bash coreutils git cmake

Environment

Then set your environment. For example, if you installed gcc-4.9 using Homebrew:

Terminal window
export CC=$(which clang)
export CXX=$(which clang++)

aGrUM Compilation

Now the installation is the same as for Linux:

Terminal window
git clone https://gitlab.com/agrumery/aGrUM.git
cd aGrUM
python act install release aGrUM --static -d INSTALL_PATH

Installation

Quick Install

git clone https://gitlab.com/agrumery/aGrUM.git
cd aGrUM
python act install release aGrUM --static -d INSTALL_PATH

Depending on where you want to install aGrUM, you might need to run the last command as root.

Requirements

  • C++20 compiler
  • Python>=3.10
  • Git

Quick Install

  • Clone aGrUM on your computer.
  • Be sure to have CMake, Python, and MSBuild in your PATH environment variable.
  • Open a command prompt in the aGrUM root directory and run:
python act install release --windows=mvsc19 -d INSTALL_PATH

Requirements

  • Visual Studio 2015/17/19/22, 32 or 64 bits, or MinGW64:
--windows=mvsc22|mvsc22_32|mvsc19|mvsc19_32|mvsc17|mvsc17_32|mvsc15|mvsc15_32|mingw64
  • CMake
  • Python

Alternatives

You should be able to build aGrUM using the MinGW toolchain or Cygwin:

--windows=mingw64

Homebrew

  • Install Homebrew. Be careful of the requirements (in particular, Xcode and Command Line Tools for Xcode).
  • Install needed Homebrew packages:
brew install bash coreutils git cmake

Environment

Then set your environment. For example, if you installed gcc-4.9 using Homebrew:

export CC=$(which clang)
export CXX=$(which clang++)

aGrUM Compilation

Now the installation is the same as for Linux:

git clone https://gitlab.com/agrumery/aGrUM.git
cd aGrUM
python act install release aGrUM --static -d INSTALL_PATH