Repository navigation
Conversation
…nd locus subsets RandomAllelesBitSetSampler3 draws a parent-set option from the infection's parent-set posterior (a tenth of updates stay uniform) and can redraw a subset of loci. The parent-set and relink proposals read the infection's sampled error rates. Also: one relink try, four informed jump tries, allele frequencies every 10th iteration, and loci with observed alleles walk the allele path every 10th iteration.
…erved-allele coverage RandomAllelesBitSetSampler3 redraws four loci per update rather than every locus. ParentRelinkSampler weights each candidate source by its summed observed-allele coverage of the infection (RELINK_SOURCE_WEIGHT_SCALE).
An independence move for a simplex-valued parameter, proposing from a fitted Dirichlet.
Each allele-frequency sampler now also makes a whole-locus Dirichlet independence move, fitted to its own trajectory over growing windows of updates (20, 50, 100, 200, 400) and fixed after the last. With the move on, the samplers update every iteration (updateFrequency 1) and the SALT sweep runs every update until the first fit, then every SALT_UPDATE_FREQUENCY-th. The fit is saved in AdaptationState::fit and in checkpoints under an optional "fits" key, so checkpoints without it still restore and fit afresh. The Sampler set's ids are unchanged.
The Dirichlet move moves allele frequencies far more per update than the SALT sweep, at about the same cost to the rest of the chain, so it runs more often and the sweep less.
With fewer updates in burn-in than the fit windows, the SALT samplers kept refitting their Dirichlet move during sampling, so what they proposed depended on the trajectory. The Sampler set fixes every fit at the first non-adapting step.
…ele draws; exact-draws invariance test
…t <= 10 observed loci); per-pair stats
… and swaps per update from an evaluation budget; checkpointed
For a pair whose observed genotypes differ somewhere, a locus where both are observed alike has nothing to exchange. The units depend on the observed data only.
… fit window, 2 allele toggles The allele-frequency Dirichlet move every 5th update with fit windows 5, 45, 100, 200, 400, and two observed-allele toggles per StrainCountSampler update.
…nd sums follow The parent-set, relink, allele-frequency, strain-count, clone-order and guided-pair proposals change the draws a seed gives; the Store's files and columns are unchanged apart from GuidedPairSampler's acceptance rows. plasmotrackr's tests that sum golden rows by hand (acceptance, swaps, sampling seconds) and its convergence print snapshot are updated to the new rows.
…ource is the background population
…ion kept the pick uniform
…e one in use, and its test runs the move alone
…e full proposal's conditional
…n bound where each was written two or three times
m-murphy
force-pushed
the
stack/2-samplers
branch
from
November 8, 2026 02:04
697f6d2 to
d95298a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sampler changes that mix the transmission network faster. Every sampler targets the same posterior as before.
Tuning changes:
RELINK_TRIES2 → 1: ParentRelinkSampler's multiple-try move is off.INFORMED_JUMP_MAX_TRIES8 → 4.Other changes:
AbstractSampler::countProposalcounts one acceptance outcome for an update built from several Proposals.Evidence
After: engine tests 311 pass (1 skipped), among them exact-draws invariance tests for GuidedPairSampler, the parent-set proposal with state-dependent option weights and the one-locus redraw, and a test of SALTSampler's Dirichlet move alone that fails without its Hastings correction. plasmotrackr tests 3724 pass.
Merge Danger
Door: two-way
Blast Radius: Runs
--resumeor--start-from.