Inference abstractions
Inference abstractions
execution checkpoints, processed differently depending on the inference algorithm
execution checkpoints, processed differently depending on the inference algorithm
(checkpoint-id cpt state checkpoint-counts checkpoint-last-id)
returns checkpoint identifier and updated state;
checkpoint-counts' and
checkpoint-last-id' should be
keys in the state
returns checkpoint identifier and updated state; `checkpoint-counts' and `checkpoint-last-id' should be keys in the state
alias to anglican.stat/collect-by, provided for backwards compatibility previous releases
alias to anglican.stat/collect-by, provided for backwards compatibility previous releases
(drop-invalid samples)
drop zero-weight samples;
drop zero-weight samples; - accepts a lazy sequence of samples; - returns a sequence that excludes zero-weight samples
(equalize samples)
equalizes samples;
equalizes samples; - accepts a lazy sequence of samples; - returns a sequence from the same distribution with equal weights
(exec algorithm prog value state)
executes the program, calling checkpoint handlers at the checkpoints and stopping when the handler returns a non-callable value
executes the program, calling checkpoint handlers at the checkpoints and stopping when the handler returns a non-callable value
main inference procedure, accepts algorithm, program, and options; returns a lazy sequence of states
main inference procedure, accepts algorithm, program, and options; returns a lazy sequence of states
(log-marginal samples)
calculates the empirical estimate of the log marginal likelihood (i.e. the log mean importance weight)
calculates the empirical estimate of the log marginal likelihood (i.e. the log mean importance weight)
prints a predict, accepts label, value, weight, and output format
prints a predict, accepts label, value, weight, and output format
(print-predicts format state)
print predicts as returned by a probabilistic program in the specified format
print predicts as returned by a probabilistic program in the specified format
(rand)
(rand n)
Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive)
Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive)
(rand-int n)
Returns a random integer between 0 (inclusive) and n (exclusive)
Returns a random integer between 0 (inclusive) and n (exclusive)
(rand-nth coll)
Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the given collection.
Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the given collection.
(rand-roulette weights)
random roulette selection, accepts unnormalized weights
random roulette selection, accepts unnormalized weights
(stripdown state)
removes algorithm-specific entries from the state
removes algorithm-specific entries from the state
(warmup prog)
(warmup prog value)
runs until the first checkpoint and returns a continuation that starts with that checkpoint
runs until the first checkpoint and returns a continuation that starts with that checkpoint
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close