Skip to content

Commit 13b9237

Browse files
committed
add TODOs
1 parent 1f98a32 commit 13b9237

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/src/for-developers/how_turing_implements_abstractmcmc.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ A lot of the things here are method-specific. However Turing also has some funct
161161

162162
`Inference.jl` defines a struct `Transition`, which corresponds to this default situation, as well as a constructor that builds instances of `Transition` from instances of `Sampler`, by finding $\theta$ and `lp` in `spl.state.vi`.
163163

164-
Construct transition from a `spl`: just dump the contents of vi-made-nametuple into a transition
164+
Construct transition from a `spl`: just dump the contents of vi-made-nametuple into a transition.
165+
166+
TODO: this is what Importance sampling uses
165167

166168
### How `sample` works
167169

@@ -174,8 +176,12 @@ A crude summary, which ignores things like parallelism, is the following. `sampl
174176

175177
you can of course implement all of these functions, but `AbstractMCMC` as well as Turing also provide default implementations for simple cases.
176178

179+
TODO: importance sampling uses the default implementations of `sample_init!` and `bundle_samples`.
180+
177181
## 3. Overload `assume` and `observe`
178182

183+
TODO: mention at some point that related info [here](https://turing.ml/dev/docs/for-developers/compiler).
184+
179185
The functions mentioned above, such as `sample_init!`, `step!`, etc., must of course use information about the model in order to generate samples! In particular, these functions may need **samples from distributions** defined in the model, or to **evaluate the density of these distributions** at some values of the corresponding parameters or observations.
180186

181187
For an example of the former, consider **Importance Sampling** as defined in `is.jl`. This implementation of Importance Sampling uses the model prior distribution as a proposal distribution, and therefore requires **samples from the prior distribution** of the model. Another example is **Approximate Bayesian Computation**, which requires multiple **samples from the model prior and likelihood distributions** in order to generate a single sample.

0 commit comments

Comments
 (0)