Expand description
The Boltzmann posterior over genomes, as a fugue program
Fix a prior program p(x) (a GenomePrior) and an observation program
p(data | x) (a GenomeLikelihood — observe statements, latent
nuisance parameters, and/or black-box factors). The target
π_β(x) ∝ p(x) · p(data | x)^βis literally a fugue model: prior.model().bind(|g| likelihood.model(&g, β).map(|_| g)). Every density this layer needs —
prior mass, tempered joint, MH acceptance — is obtained by running or
replaying that program; there is no hand-written density code.
For the classical black-box case, EvolutionModel::new(prior, fitness)
wraps a scalar Fitness in FactorFitness (factor(β·f(x)) — the
Gibbs / generalized-Bayes posterior); EvolutionModel::from_likelihood
accepts any observation program.
Two builders exist because MH wants a fixed-β target while tempered SMC
must receive the β = 1 program (fugue’s adaptive_smc supplies β by
tempering log_likelihood + log_factors; baking β in as well would
double-count it).
Structs§
- Evolution
Model - A probabilistic model of an evolutionary population: a genome prior
program, an observation program (likelihood), and an inverse temperature
β.