= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
ON THIS PAGE
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Module type describing the DSL, implemented by inference backends.
Core constructs of the DSL
sample dist
builds a computation that samples from dist
. Note that dist
must be a pure computation.
samplei dist
is similar to sample
except that dist
can be an impure computation (ie computing the distribution can involve sampling from other distributions).
map_score m f
behaves similarly to m
except that the associated computation will be reweighted according to the result of evaluating f
on the value of m
.
val map_log_score : 'a t -> ('a -> Log_space.t) -> 'a t
Same as map_score
excepts that a log-space likelihood is expected.
val score : float -> unit t
score s
reweights the computation by s
.
val log_score : Log_space.t -> unit t
log_score
behaves as score
except that a log-space weight is expected.