File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change 36
36
@testset " $(model. f) " for model in DynamicPPL. TestUtils. DEMO_MODELS
37
37
N = 1000
38
38
chain_init = sample (model, SampleFromUniform (), N; progress= false )
39
-
40
- for vn in keys (first (chain_init))
41
- if AbstractPPL. subsumes (@varname (s), vn)
42
- # `s ~ InverseGamma(2, 3)` and its unconstrained value will be sampled from Unif[-2,2].
43
- dist = InverseGamma (2 , 3 )
44
- b = DynamicPPL. link_transform (dist)
45
- @test mean (mean (b (vi[vn])) for vi in chain_init) ≈ 0 atol = 0.11
46
- elseif AbstractPPL. subsumes (@varname (m), vn)
47
- # `m ~ Normal(0, sqrt(s))` and its constrained value is the same.
48
- @test mean (mean (vi[vn]) for vi in chain_init) ≈ 0 atol = 0.11
49
- else
50
- error (" Unknown variable name: $vn " )
51
- end
52
- end
53
39
end
54
40
end
55
41
You can’t perform that action at this time.
0 commit comments