Expand description
Likelihoods as programs
The inference layer’s conditioning side. A GenomeLikelihood is an
observation program p(data | genome) — not merely a scalar score. It
may contain:
observestatements over real data (per-datum log-likelihoods land in the trace’slog_likelihoodaccumulator with genuine structure),- latent nuisance parameters (
samplesites — e.g. an unknown observation noiseσ— which are then jointly inferred with the genome; their posteriors are read straight off the particle traces), factorstatements for soft constraints or black-box scores.
The black-box case — an arbitrary fitness f entering as factor(β·f) —
is the FactorFitness adapter. That target is a generalized-Bayes /
Gibbs posterior (Bissiri, Holmes & Walker 2016): perfectly legitimate,
but now one mode among many rather than the only one.
Structs§
- Factor
Fitness - The black-box adapter: a scalar
Fitnessentering asfactor(β·f(g)). - Memoized
Fitness - A memoizing wrapper around an expensive
Fitness. - NoLikelihood
- Convenience: a
()-like likelihood that conditions on nothing (the posterior is the prior). Useful for testing priors through the inference drivers.
Traits§
- Genome
Likelihood - An observation program
p(data | genome), possibly tempered.
Functions§
- tempered_
observe - A tempered observation: at
β = 1this is exactlyobserve(addr, dist, value)(the log-density lands inlog_likelihood); at otherβit isfactor(β · log p(value))(landing inlog_factors). Both accumulators are tempered together by fugue’s SMC, so the two forms are interchangeable under tempering — theβ = 1form is preferred because it keeps the likelihood/prior decomposition visible in the trace.