File tree 1 file changed +26
-0
lines changed 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ using Test
3
3
using MeasureTheory
4
4
import TransformVariables as TV
5
5
using TransformVariables: transform
6
+ using SampleChainsDynamicHMC
6
7
using Aqua
8
+
7
9
Aqua. test_all (Soss; ambiguities= false , unbound_args= false )
8
10
9
11
include (" examples-list.jl" )
@@ -19,6 +21,30 @@ include("examples-list.jl")
19
21
end
20
22
end
21
23
24
+ @testset " README" begin
25
+
26
+ m = @model x begin
27
+ α ~ Lebesgue (ℝ)
28
+ β ~ Normal ()
29
+ σ ~ Exponential ()
30
+ y ~ For (x) do xj
31
+ Normal (α + β * xj, σ)
32
+ end
33
+ return y
34
+ end
35
+
36
+ x = randn (20 )
37
+
38
+ predα = predictive (m, :α )
39
+
40
+ y = rand (predα (x= x,α= 10.0 ))
41
+
42
+ post = sample (m (x= x) | (y= y,), dynamichmc ())
43
+
44
+ @test post isa AbstractArray
45
+
46
+ end
47
+
22
48
@testset " Examples" begin
23
49
for example in EXAMPLES
24
50
@testset " Run example: $(example[1 ]) " begin
You can’t perform that action at this time.
0 commit comments