Skip to content

Instantly share code, notes, and snippets.

View bdeonovic's full-sized avatar

Benjamin Deonovic bdeonovic

View GitHub Profile
torfjelde / turing-new-interface.jl
Last active November 18, 2023 22:26
Simple example of using NUTS with the new iterator interface in AbstractMCMC.jl available using Turing.jl > 0.15.
View turing-new-interface.jl
julia> using Turing, Random
julia> @model function gdemo(xs)
# Assumptions
σ² ~ InverseGamma(2, 3)
μ ~ Normal(0, √σ²)
# Observations
for i = 1:length(xs)
xs[i] ~ Normal(μ, √σ²)