Skip to content

Commit

Permalink
Fix Turing MH sampler (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Sep 24, 2022
1 parent 0452345 commit 3cd94dd
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 74 deletions.
3 changes: 2 additions & 1 deletion tutorials/14-minituring/14_minituring.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ We compare these results with Turing.

```julia
using Turing
using PDMats

@model function turing_m(x)
a ~ Normal(0.5, 1)
Expand All @@ -281,7 +282,7 @@ using Turing
return nothing
end

sample(turing_m(3.0), MH(:a => Normal(), :b => Normal()), 1_000_000)
sample(turing_m(3.0), MH(ScalMat(2, 1.0)), 1_000_000)
```

As you can see, with our simple probabilistic programming language and custom samplers we get similar results as Turing.
Loading

0 comments on commit 3cd94dd

Please sign in to comment.