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
+2-16Lines changed: 2 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -456,17 +456,11 @@ 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
@@ -495,15 +489,7 @@ DynamicPPL.init
495
489
496
490
### Samplers
497
491
498
-
In DynamicPPL two samplers are defined that are used to initialize unobserved random variables:
499
-
[`SampleFromPrior`](@ref) which samples from the prior distribution, and [`SampleFromUniform`](@ref) which samples from a uniform distribution.
500
-
501
-
```@docs
502
-
SampleFromPrior
503
-
SampleFromUniform
504
-
```
505
-
506
-
Additionally, a generic sampler for inference is implemented.
492
+
In DynamicPPL a generic sampler for inference is implemented.
507
493
508
494
```@docs
509
495
Sampler
@@ -514,7 +500,7 @@ The default implementation of [`Sampler`](@ref) uses the following unexported fu
514
500
```@docs
515
501
DynamicPPL.initialstep
516
502
DynamicPPL.loadstate
517
-
DynamicPPL.initialsampler
503
+
DynamicPPL.init_strategy
518
504
```
519
505
520
506
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