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
+6-15Lines changed: 6 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -456,33 +456,24 @@ AbstractPPL.evaluate!!
456
456
457
457
This method mutates the `varinfo` used for execution.
458
458
By default, it does not perform any actual sampling: it only evaluates the model using the values of the variables that are already in the `varinfo`.
459
-
To perform sampling, you can either wrap `model.context` in a `SamplingContext`, or use this convenience method:
460
-
461
-
```@docs
462
-
DynamicPPL.evaluate_and_sample!!
463
-
```
464
459
465
460
The behaviour of a model execution can be changed with evaluation contexts, which are a field of the model.
466
461
Contexts are subtypes of `AbstractPPL.AbstractContext`.
467
462
468
463
```@docs
469
-
SamplingContext
470
464
DefaultContext
471
465
PrefixContext
472
466
ConditionContext
467
+
InitContext
473
468
```
474
469
475
-
### Samplers
470
+
### VarInfo initialisation
476
471
477
-
In DynamicPPL two samplers are defined that are used to initialize unobserved random variables:
478
-
[`SampleFromPrior`](@ref) which samples from the prior distribution, and [`SampleFromUniform`](@ref) which samples from a uniform distribution.
472
+
TODO
479
473
480
-
```@docs
481
-
SampleFromPrior
482
-
SampleFromUniform
483
-
```
474
+
### Samplers
484
475
485
-
Additionally, a generic sampler for inference is implemented.
476
+
In DynamicPPL a generic sampler for inference is implemented.
486
477
487
478
```@docs
488
479
Sampler
@@ -493,7 +484,7 @@ The default implementation of [`Sampler`](@ref) uses the following unexported fu
493
484
```@docs
494
485
DynamicPPL.initialstep
495
486
DynamicPPL.loadstate
496
-
DynamicPPL.initialsampler
487
+
DynamicPPL.init_strategy
497
488
```
498
489
499
490
Finally, to specify which varinfo type a [`Sampler`](@ref) should use for a given [`Model`](@ref), this is specified by [`DynamicPPL.default_varinfo`](@ref) and can thus be overloaded for each `model`-`sampler` combination. This can be useful in cases where one has explicit knowledge that one type of varinfo will be more performant for the given `model` and `sampler`.
0 commit comments