Skip to content

Turing.jl

Bayesian inference with probabilistic programming.

Intuitive

Turing models are easy to read and write — models work the way you write them.

General-purpose

Turing supports models with discrete parameters and stochastic control flow. Specify complex models quickly and easily.

Modular

Turing is modular, written fully in Julia, and can be modified to suit your needs.

High-performance

Turing is fast.

Hello World in Turing — Linear Gaussian Model

Turing’s modelling syntax allows you to specify a model quickly and easily. Straightforward models can be expressed in the same way as complex, hierarchical models with stochastic control flow.

Quick Start

 @model gdemo(x, y) = begin
  # Assumptions
  σ ~ InverseGamma(2,3)
  μ ~ Normal(0,sqrt(σ))
  # Observations
  x ~ Normal(μ, sqrt(σ))
  y ~ Normal(μ, sqrt(σ))
end
 

Advanced Markov Chain Monte Carlo Samplers

Turing provides Hamiltonian Monte Carlo sampling for differentiable posterior distributions, Particle MCMC sampling for complex posterior distributions involving discrete variables and stochastic control flow, and Gibbs sampling which combines particle MCMC, HMC and many other MCMC algorithms.

Samplers

Interoperable With Deep Learning Libraries

Turing supports Julia’s Flux package for automatic differentiation. Combine Turing and Flux to construct probabalistic variants of traditional machine learning models.

Bayesian Neural Network Tutorial

Bayesian Neural Network Tutorial

Community

Join the Turing community to contribute, learn, and get your questions answered.

GitHub

Report bugs, request features, discuss issues, and more.

Go to GitHub

Turing.jl Discuss

Browse and join discussions on Turing.

Go to Turing.jl Discuss

Slack

Discuss advanced topics. Request access here.

Go to Slack

Ecosystem

Explore a rich ecosystem of libraries, tools, and more to support development.

AdvancedHMC

Robust, modular and efficient implementation of advanced Hamiltonian Monte Carlo algorithms.

Go to AdvancedHMC

MCMCChains

Chain types and utility functions for MCMC simulations.

Go to MCMCChains

Bijectors

Automatic transformations for constrained random variables.

Go to Bijectors