You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/api.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,22 @@ These statements are rewritten by `@model` as calls of [internal functions](@ref
14
14
@model
15
15
```
16
16
17
-
One can nest models and call another model inside the model function with [`@submodel`](@ref) and [`@returned_quantities(model)`](@ref).
17
+
One can nest models and call another model inside the model function with `left ~ to_sampleable(model)`.
18
+
19
+
```@docs
20
+
to_sampleable
21
+
```
22
+
23
+
In the past, one would instead embed sub-models using [`@submodel`](@ref), which has been deprecated since the introduction of [`to_sampleable(model)`](@ref)
18
24
19
25
```@docs
20
26
@submodel
21
-
@returned_quantities(model)
22
27
```
23
28
24
29
In the context of nesting models, it's also useful to prefix the variables in sub-models to avoid variable names clashing:
25
30
26
31
```@docs
27
-
@prefix
28
-
DynamicPPL.prefix
32
+
prefix
29
33
```
30
34
31
35
### Type
@@ -126,11 +130,10 @@ It is possible to manually increase (or decrease) the accumulated log density fr
126
130
@addlogprob!
127
131
```
128
132
129
-
Return values of the model function for a collection of samples can be obtained with [`@returned_quantities`](@ref).
133
+
Return values of the model function for a collection of samples can be obtained with [`returned_quantities`](@ref).
130
134
131
135
```@docs
132
-
@returned_quantities(model, input)
133
-
DynamicPPL.returned_quantities
136
+
returned_quantities
134
137
```
135
138
136
139
For a chain of samples, one can compute the pointwise log-likelihoods of each observed random variable with [`pointwise_loglikelihoods`](@ref). Similarly, the log-densities of the priors using
0 commit comments