Skip to content

Tutorials

These tutorials are self-contained. They do not build on one another, so the sensible thing is to go straight to whichever one is closest to the problem you have.

The exception is Getting started, which introduces the three ideas that all the others take for granted: latent models, observation models, and posteriors. If you have not used the package before, read that one first — everything else will make more sense afterwards.

Start here

  • Getting started runs through the whole workflow twice, once on a time series and once on a spatial field.

Building models

  • Building autoregressive models constructs an AR(1) model by hand, from its mean and precision matrix, and then again through the model interface. Read this if you want to see where the sparsity actually comes from.

  • Spatial Modelling with SPDEs fits a Matérn field to zinc measurements in the soil near the Meuse river, and explains the link between Gaussian processes and SPDEs that makes this efficient.

  • Spatiotemporal Modelling with SPDEs models a pollutant spreading through a river over time, on a 1D toy domain.

  • Modelling on manifolds leaves flat Euclidean space behind: it builds a Matérn field on a sphere from a surface mesh, verifies it against the exact solution, and lets an advection–diffusion field rotate around the globe.

  • Boundary Conditions for SPDEs explains why the default boundary behaviour of an SPDE discretization is often not what you want, and what to do about it.

Non-Gaussian observations

Hyperparameter inference

Going further

Both tutorials show the mechanics — gradients first, then samples. If you want the whole workflow rather than the building blocks, Latte.jl is a probabilistic programming language for latent Gaussian models built on top of this package, providing INLA, TMB-style Laplace approximations and HMC-Laplace behind a model specification syntax. Its documentation has worked examples.

Further topics