# Examples overview

This section contains a set of examples for Bayesian Inference with `RxInfer`

package in various probabilistic models.

All examples have been pre-generated automatically from the `examples/`

folder at GitHub repository.

- Coin toss model (Beta-Bernoulli): An example of Bayesian inference in Beta-Bernoulli model with IID observations.
- Bayesian Linear Regression: An example of Bayesian linear regression.
- Active Inference Mountain car: This notebooks covers RxInfer usage in the Active Inference setting for the simple mountain car problem.
- Chance-Constrained Active Inference: This notebook applies reactive message passing for active inference in the context of chance-constraints.
- 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.
- Gaussian Linear Dynamical System: An example of inference procedure for Gaussian Linear Dynamical System with multivariate noisy observations using Belief Propagation (Sum Product) algorithm. Reference: Simo Sarkka, Bayesian Filtering and Smoothing.
- Ensemble Learning of a Hidden Markov Model: An example of structured variational Bayesian inference in Hidden Markov Model with unknown transition and observational matrices.
- Autoregressive Model: An example of variational Bayesian Inference on full graph for Autoregressive model. Reference: Albert Podusenko, Message Passing-Based Inference for Time-Varying Autoregressive Models.
- 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.
- Bayesian ARMA model: This notebook shows how Bayesian ARMA (Autoregressive Moving-Average) model can be implemeted in
**RxInfer.jl** - Infinite Data Stream: This example shows RxInfer capabilities of running inference for infinite time-series data.
- System Identification Problem: This example attempts to identify and separate two combined signals.
- Univariate Gaussian Mixture Model: This example implements variational Bayesian inference in a univariate Gaussian mixture model with mean-field assumption.
- Multivariate Gaussian Mixture Model: This example implements variational Bayesian inference in a multivariate Gaussian mixture model with mean-field assumption.
- Gamma Mixture Model: This example implements one of the Gamma mixture experiments outlined in https://biaslab.github.io/publication/mp-based-inference-in-gmm/ .
- Universal Mixtures: Universal mixture modeling.
- Global Parameter Optimisation: This example shows how to use RxInfer.jl automated inference within other optimisation packages such as Optim.jl.
- 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.
- 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.
- 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.
- Nonlinear Smoothing: Noisy Pendulum: In this demo, we will look at a realistic dynamical system with nonlinear state transitions: tracking a noisy single pendulum. We translate a differential equation in state-space model form to a probabilistic model.
- Nonlinear Smoothing: Rabbit Population: In this demo, we will look at dynamical systems with nonlinear state transitions. We will start with a one-dimensional problem; the number of rabbits on an island. This problem seems overly simple, but it is a good way to demonstrate the basic pipeline of working with RxInfer.
- Nonlinear Virus Spread: In this demo we consider a model for the spead of a virus (not COVID-19!) in a population. We are interested in estimating the reproduction rate from daily observations of the number of infected individuals.
- Nonlinear Sensor Fusion: Nonlinear object position identification using a sparse set of sensors
- Kalman filter with LSTM network driven dynamic: In this demo, we are interested in Bayesian state estimation in Nonlinear State-Space Model using the LSTM.
- Handling Missing Data: This example shows how to extend the set of builtin rules to support
`missing`

observations. - Custom 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. - 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.
- RTS vs BIFM Smoothing: This example performs BIFM Kalman smoother on a factor graph using message passing and compares it with the RTS implementation.
- Advanced Tutorial: This notebook covers the fundamentals and advanced usage of the
`RxInfer.jl`

package.