Latent Gaussians,
simply brewed.

Probabilistic programming for latent Gaussian models in Julia.

disease_map.jl
# Disease mapping with a Besag ICAR prior
@latte function disease(y, E, W)
  β ~ MvNormal(zeros(1), 100.0 * I(1))
  τ ~ PCPrior.Precision(1.0, α = 0.01)
  u ~ BesagModel(W; normalize_var = Val{true}())(τ = τ)
  for i in eachindex(y)
    y[i] ~ Poisson(E[i] * exp(β[1] + u[i]))
  end
end

# Choose your inference engine
fit = inla(disease(y, E, W), y)
fit = tmb(disease(y, E, W), y)
fit = hmc_laplace(disease(y, E, W), y)
See the full disease-mapping tutorial →
INLA
Nested Laplace approximation with per-hyperparameter marginals.
typical fit · ms – s
TMB
TMB-style delta-method uncertainty at the hyperparameter mode — fast. And, like TMB's templates, a language for custom models: write Gaussian or non-Gaussian models in the PPL.
typical fit · ~ms
HMC-Laplace
NUTS over hyperparameters with a Laplace step on the latent.
typical fit · seconds – minutes
BENCHMARK · TOKYO RAINFALL

Gold-standard accuracy, in milliseconds.

366-day binomial · RW2 smoothing · warm fit

warm-fit time
Latte INLA76 msR-INLA1.51 s
posterior · day #283 of 366 · KS 0.04
Latte INLAR-INLASee all benchmarks →