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
@@ -440,33 +440,24 @@ AbstractPPL.evaluate!!
440
440
441
441
This method mutates the `varinfo` used for execution.
442
442
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`.
443
-
To perform sampling, you can either wrap `model.context` in a `SamplingContext`, or use this convenience method:
444
-
445
-
```@docs
446
-
DynamicPPL.evaluate_and_sample!!
447
-
```
448
443
449
444
The behaviour of a model execution can be changed with evaluation contexts, which are a field of the model.
450
445
Contexts are subtypes of `AbstractPPL.AbstractContext`.
451
446
452
447
```@docs
453
-
SamplingContext
454
448
DefaultContext
455
449
PrefixContext
456
450
ConditionContext
451
+
InitContext
457
452
```
458
453
459
-
### Samplers
454
+
### VarInfo initialisation
460
455
461
-
In DynamicPPL two samplers are defined that are used to initialize unobserved random variables:
462
-
[`SampleFromPrior`](@ref) which samples from the prior distribution, and [`SampleFromUniform`](@ref) which samples from a uniform distribution.
456
+
TODO
463
457
464
-
```@docs
465
-
SampleFromPrior
466
-
SampleFromUniform
467
-
```
458
+
### Samplers
468
459
469
-
Additionally, a generic sampler for inference is implemented.
460
+
In DynamicPPL a generic sampler for inference is implemented.
470
461
471
462
```@docs
472
463
Sampler
@@ -477,7 +468,7 @@ The default implementation of [`Sampler`](@ref) uses the following unexported fu
477
468
```@docs
478
469
DynamicPPL.initialstep
479
470
DynamicPPL.loadstate
480
-
DynamicPPL.initialsampler
471
+
DynamicPPL.init_strategy
481
472
```
482
473
483
474
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