Expand description
gen_rs is a a library for general-purpose, low-level probabilistic modeling and inference.
Modeling and inference are separated by a trait interface, called GenFn.
Any function that implements GenFn (representing a Bayesian model) can use and compose
any inference procedure in the standard inference library.
Re-exports§
pub use trie::Trie;pub use address::SplitAddr;pub use address::normalize_addr;pub use gfi::Trace;pub use gfi::GenFn;pub use gfi::GfDiff;pub use modeling::dists::u01;pub use modeling::dists::Distribution;pub use modeling::dists::bernoulli;pub use modeling::dists::uniform_continuous;pub use modeling::dists::uniform;pub use modeling::dists::uniform_discrete;pub use modeling::dists::categorical;pub use modeling::dists::normal;pub use modeling::dists::mvnormal;pub use modeling::triefn::TrieFn;pub use modeling::triefn::TrieFnState;pub use modeling::triefn::AddrTrie;pub use modeling::unfold::Unfold;pub use inference::importance_sampling;pub use inference::metropolis_hastings;pub use inference::mh;pub use inference::mh;pub use inference::ParticleSystem;
Modules§
- address
- Utilities for parsing addresses (special keys used in the
Triedata structure). - gfi
- Definition of the Generative Function Interface (GFI).
- inference
- Standard inference library.
- modeling
- Distributions and a modeling DSL built on
Tries. - trie
- Implementations of the
Triedata structure, used extensively inmodeling::triefn.
Constants§
- GLOBAL_
RNG - Forked PRNG, accessible as a static crate-level thread-local constant. (Use like
GLOBAL_RNG.with_borrow_mut(|rng| { ... })).
Functions§
- logsumexp
- For an input vector of
[x1, ..., xn], returnlog(exp(x1) + ... + exp(xn)).