|
48 | 48 | Sample from the posterior predictive distribution by executing `model` with parameters fixed to each sample
|
49 | 49 | in `chain`, and return the resulting `Chains`.
|
50 | 50 |
|
51 |
| -The `model` passed to `predict` is often different from the one used to generate `chain`. |
52 |
| -Typically, the model from which `chain` originated treats certain variables as observed (i.e., |
53 |
| -data points), while the model you pass to `predict` may mark these same variables as missing |
54 |
| -or unobserved. Calling `predict` then leverages the previously inferred parameter values to |
| 51 | +The `model` passed to `predict` is often different from the one used to generate `chain`. |
| 52 | +Typically, the model from which `chain` originated treats certain variables as observed (i.e., |
| 53 | +data points), while the model you pass to `predict` may mark these same variables as missing |
| 54 | +or unobserved. Calling `predict` then leverages the previously inferred parameter values to |
55 | 55 | simulate what new, unobserved data might look like, given your posterior beliefs.
|
56 | 56 |
|
57 | 57 | For each parameter configuration in `chain`:
|
58 | 58 | 1. All random variables present in `chain` are fixed to their sampled values.
|
59 | 59 | 2. Any variables not included in `chain` are sampled from their prior distributions.
|
60 | 60 |
|
61 | 61 | If `include_all` is `false`, the returned `Chains` will contain only those variables that were not fixed by
|
62 |
| -the samples in `chain`. This is useful when you want to sample only new variables from the posterior |
| 62 | +the samples in `chain`. This is useful when you want to sample only new variables from the posterior |
63 | 63 | predictive distribution.
|
64 | 64 |
|
65 | 65 | # Examples
|
@@ -124,7 +124,7 @@ function DynamicPPL.predict(
|
124 | 124 | map(DynamicPPL.varname_and_value_leaves, keys(vals), values(vals)),
|
125 | 125 | )
|
126 | 126 |
|
127 |
| - return (varname_and_values=varname_vals, logp=DynamicPPL.getlogp(varinfo)) |
| 127 | + return (varname_and_values=varname_vals, logp=DynamicPPL.getlogjoint(varinfo)) |
128 | 128 | end
|
129 | 129 |
|
130 | 130 | chain_result = reduce(
|
|
0 commit comments