Skip to main content

Module prior

Module prior 

Source
Expand description

Priors over genomes as probabilistic programs

A GenomePrior is the load-bearing abstraction of the inference layer: instead of a closed enum of built-in priors, the prior over genomes is an arbitrary fugue [Model] written by the user (or one of the constructors below). Running it under a PriorHandler both draws p(x) and accumulates log_prior; scoring an existing genome’s trace against it recovers the genuine prior density — there is no hand-written density code anywhere in this layer.

The model returns the decoded genome G, not a bare vector: the model’s return value is the decode, which is what lets the SMC layer recover a genome from a bare particle trace by replay (see crate::inference::smc::EvolutionPosterior).

Structs§

BitStringPrior
Independent Bernoulli(p) prior on every bit of a BitString.
GaussianPrior
Independent Gaussian N(mean, std²) prior on every real coordinate.
PermutationPrior
Fisher–Yates / Lehmer-code uniform prior over permutations of 0..n.
UniformBoxPrior
Independent uniform prior over a bounded box (per-dimension [min, max]).

Traits§

GenomePrior
A prior distribution over genomes, expressed as a probabilistic program.