Skip to content

Instantly share code, notes, and snippets.

Avatar
🥐
Baking

Benjamin Deonovic bdeonovic

🥐
Baking
View GitHub Profile
@torfjelde
torfjelde / turing-new-interface.jl
Last active Aug 10, 2021
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(μ, σ²)
end