Skip to content

Commit 34fb6bd

Browse files
committed
updated DynamicPPLMCMCChainsExt to define returned_quantities
1 parent 55b95a1 commit 34fb6bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/DynamicPPLMCMCChainsExt.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function DynamicPPL.varnames(c::MCMCChains.Chains)
4343
end
4444

4545
"""
46-
generated_quantities(model::Model, chain::MCMCChains.Chains)
46+
returned_quantities(model::Model, chain::MCMCChains.Chains)
4747
4848
Execute `model` for each of the samples in `chain` and return an array of the values
4949
returned by the `model` for each sample.
@@ -63,7 +63,7 @@ m = demo(data)
6363
chain = sample(m, alg, n)
6464
# To inspect the `interesting_quantity(θ, x)` where `θ` is replaced by samples
6565
# from the posterior/`chain`:
66-
generated_quantities(m, chain) # <= results in a `Vector` of returned values
66+
returned_quantities(m, chain) # <= results in a `Vector` of returned values
6767
# from `interesting_quantity(θ, x)`
6868
```
6969
## Concrete (and simple)
@@ -87,7 +87,7 @@ julia> model = demo(randn(10));
8787
8888
julia> chain = sample(model, MH(), 10);
8989
90-
julia> generated_quantities(model, chain)
90+
julia> returned_quantities(model, chain)
9191
10×1 Array{Tuple{Float64},2}:
9292
(2.1964758025119338,)
9393
(2.1964758025119338,)
@@ -101,7 +101,7 @@ julia> generated_quantities(model, chain)
101101
(-0.16489786710222099,)
102102
```
103103
"""
104-
function DynamicPPL.generated_quantities(
104+
function DynamicPPL.returned_quantities(
105105
model::DynamicPPL.Model, chain_full::MCMCChains.Chains
106106
)
107107
chain = MCMCChains.get_sections(chain_full, :parameters)

0 commit comments

Comments
 (0)