Skip to content

Instantly share code, notes, and snippets.

View bdeonovic's full-sized avatar
🥐
Baking

Benjamin Deonovic bdeonovic

🥐
Baking
View GitHub Profile
@torfjelde
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.
julia> using Turing, Random
julia> @model function gdemo(xs)
# Assumptions
σ² ~ InverseGamma(2, 3)
μ ~ Normal(0, σ²)
# Observations
for i = 1:length(xs)
xs[i] ~ Normal(μ, σ²)
end