List of Examples

Welcome to our curated collection of RxInfer.jl examples! Here you'll find a comprehensive set of tutorials, demonstrations, and real-world applications that showcase the power and flexibility of RxInfer.jl.

Each example comes with:

  • A detailed description of concepts covered
  • Relevant tags for easy filtering
  • Complete source code and explanations
  • Visualizations and results analysis
Contributing

This gallery is community-driven and automatically generated from our repository. We welcome your contributions!

External Resources

Community Tutorials & Guides

  • Active Inference with RxInfer.jl
    An in-depth exploration of Active Inference principles guided by Kobus Esterhuysen at Learnable Loop.
  • Video Tutorial Series
    Comprehensive video tutorials covering RxInfer.jl's core concepts and applications by @doggotodjl.

Basic Examples

Fundamental concepts and introductory tutorials. Start here if you're new to RxInfer.jl. These examples cover basic probabilistic models, inference techniques, and data processing.

Bayesian Binomial Regression

An introductory tutorial to Bayesian binomial regression with RxInfer. Learn how to model binary outcomes using logistic regression with proper Bayesian inference. The example demonstrates the use of Expectation Propagation (EP) algorithm and Polya-Gamma augmentation.

basic examples regression multivariate expectation propagation polya-gamma

Bayesian Linear Regression

An extensive tutorial on Bayesian linear regression with RxInfer with a lot of examples, including multivariate and hierarchical linear regression.

basic examples regression tutorial hierarchical model multivariate

Coin toss model (Beta-Bernoulli)

An example of Bayesian inference in Beta-Bernoulli model with IID observations.

basic examples conjugate model iid observations beta bernoulli

How to train your Hidden Markov Model

An example of structured variational Bayesian inference in Hidden Markov Model with unknown transition and observational matrices.

basic examples hmm structured inference variational inference

Kalman filtering and smoothing

In this demo, we are interested in Bayesian state estimation in different types of State-Space Models, including linear, nonlinear, and cases with missing observations

basic examples state space model kalman filter missing data nonlinear

Predicting Bike Rental Demand

An illustrative guide to implementing prediction mechanisms within RxInfer.jl, using bike rental demand forecasting as a contextual example.

basic examples prediction time series real data

Advanced Examples

More complex applications and advanced inference techniques. These examples demonstrate sophisticated models, performance optimization, and integration with other Julia packages.

Active Inference Mountain car

This notebooks covers RxInfer usage in the Active Inference setting for the simple mountain car problem.

advanced examples active inference control reinforcement learning

Advanced Tutorial

This notebook covers the fundamentals and advanced usage of the `RxInfer.jl` package.

advanced examples tutorial fundamentals

Assessing People's Skills

The demo is inspired by the example from Chapter 2 of Bishop's Model-Based Machine Learning book. We are going to perform an exact inference to assess the skills of a student given the results of the test.

advanced examples exact inference educational skill assessment

Chance-Constrained Active Inference

This notebook applies reactive message passing for active inference in the context of chance-constraints.

advanced examples active inference constraints control

Conjugate-Computational Variational Message Passing (CVI)

This example provides an extensive tutorial for the non-conjugate message-passing based inference by exploiting the local CVI approximation.

advanced examples cvi non conjugate variational inference tutorial

Drone Dynamics

This example shows how to use RxInfer.jl automated inference to simulate drone dynamics.

advanced examples

Solve GP regression by SDE

In this notebook, we solve a GP regression problem by using 'Stochastic Differential Equation' (SDE). This method is well described in the dissertation 'Stochastic differential equation methods for spatio-temporal Gaussian process regression.' by Arno Solin and 'Sequential Inference for Latent Temporal Gaussian Process Models' by Jouni Hartikainen.

advanced examples gaussian process sde regression state space model

Global Parameter Optimisation

This example shows how to use RxInfer.jl automated inference within other optimisation packages such as Optim.jl.

advanced examples optimization parameter estimation integration

Infinite Data Stream

This example shows RxInfer capabilities of running inference for infinite time-series data.

advanced examples streaming online inference time series

Nonlinear Sensor Fusion

Nonlinear object position identification using a sparse set of sensors

advanced examples sensor fusion nonlinear sparse data

Problem Specific

Real-world applications and domain-specific models. These examples show how RxInfer.jl can be applied to specific problems like time series analysis and signal processing.

Autoregressive Models

An example of Bayesian treatment of latent AR and ARMA models. Reference: [Albert Podusenko, Message Passing-Based Inference for Time-Varying Autoregressive Models](https://www.mdpi.com/1099-4300/23/6/683).

problem specific time series arma latent variables

Gamma Mixture Model

This example implements one of the Gamma mixture experiments outlined in https://biaslab.github.io/publication/mp-based-inference-in-gmm/ .

problem specific mixture model gamma distribution clustering

Gaussian Mixture

This example implements variational Bayesian inference in univariate and multivariate Gaussian mixture models with mean-field assumption.

problem specific mixture model gaussian mean field clustering

Hierarchical Gaussian Filter

An example of online inference procedure for Hierarchical Gaussian Filter with univariate noisy observations using Variational Message Passing algorithm. Reference: [Ismail Senoz, Online Message Passing-based Inference in the Hierarchical Gaussian Filter](https://ieeexplore.ieee.org/document/9173980).

problem specific hierarchical model online inference filtering

Invertible neural networks: a tutorial

An example of variational Bayesian Inference with invertible neural networks. Reference: Bart van Erp, Hybrid Inference with Invertible Neural Networks in Factor Graphs.

problem specific neural networks invertible networks hybrid inference

Litter Model

Using Bayesian Inference and RxInfer to estimate daily litter events (adapted from https://learnableloop.com/posts/LitterModel_PORT.html)

problem specific real data time series event modeling

Probit Model (EP)

In this demo we illustrate EP in the context of state-estimation in a linear state-space model that combines a Gaussian state-evolution model with a discrete observation model.

problem specific expectation propagation probit state space model

RTS vs BIFM Smoothing

This example performs BIFM Kalman smoother on a factor graph using message passing and compares it with the RTS implementation.

problem specific smoothing kalman filter comparison

Simple Nonlinear Node

In this example we create a non-conjugate model and use a nonlinear link function between variables. We show how to extend the functionality of `RxInfer` and to create a custom factor node with arbitrary message passing update rules.

problem specific nonlinear custom node message passing

Structural Dynamics with Augmented Kalman Filter

In this example, we estimate system states and unknown input forces for a simple **structural dynamical system** using the Augmented Kalman Filter (AKF) (https://www.sciencedirect.com/science/article/abs/pii/S0888327011003931) in **RxInfer**.

problem specific kalman filter structural dynamics state estimation

Universal Mixtures

Universal mixture modeling.

problem specific mixture model universal approximation
Contributing

This gallery is community-driven and automatically generated from our repository. We welcome your contributions!