package prbnmcn-dagger

  1. Overview
  2. Docs
Probabilistic programming library

Install

Dune Dependency

Authors

Maintainers

Sources

0.0.5.tar.gz
md5=d3d86327b3092678c431b5bc887d9dd6
sha512=4a5c781c7e20b10f7f74fa6138901acc3d9c9017a0ff1f003c913d1acbfdcae84156c004283ed656c01f7c2ca23b8cbef3a853cdfb265b64838b89fd9d5024ba

doc/prbnmcn-dagger/Dagger/Resampling/module-type-Particles/index.html

Module type Resampling.ParticlesSource

A Particles module exposes primitives available to resampling algorithms.

type p

p is the type of particles

type o

o is the type of particle outputs.

type r

r is the type of the scores associated to each particle

val iter : (p -> r -> unit) -> unit

iter allows to iterate on the current population of particles.

val fold : ('acc -> p -> r -> 'acc) -> 'acc -> 'acc

fold allows to fold on the current population of particles.

val get_output : p -> o option

get_output p is the output of the particle at the last yield point. Returns None if the particle has terminated. See the documentation for yield in Smc_inference.

val get_score : p -> r

get_score p is the unnormalized score of the particle.

val append : p -> r -> unit

append p r appends particle p with score r to the next population.

val total : unit -> r

total () is the total mass of the current population.

val size : unit -> int

size () is the cardinality of the current population.

val ess : unit -> r

ess () is the estimated sample size. Varies between 0 and the cardinality of the current population. Computed as \left(\sum_{i=1}^N w_i^2\right)^{-1}, where N is equal to size () and the w_i are the normalized scores of each particle.

OCaml

Innovation. Community. Security.