File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ using Test
33using MeasureTheory
44import TransformVariables as TV
55using TransformVariables: transform
6+ using SampleChainsDynamicHMC
67using Aqua
8+
79Aqua. test_all (Soss; ambiguities= false , unbound_args= false )
810
911include (" examples-list.jl" )
@@ -19,6 +21,30 @@ include("examples-list.jl")
1921 end
2022 end
2123
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+
2248 @testset " Examples" begin
2349 for example in EXAMPLES
2450 @testset " Run example: $(example[1 ]) " begin
You can’t perform that action at this time.
0 commit comments