Parent
#45
What to build
Introduce an observation-model abstraction in the MCMC chain with a narrow interface: log-likelihood of observations given a latent genotype support set and per-sample error parameters, and (later) latent genotype proposal. Move the existing binary TP/TN/FP/FN observation logic behind a BinaryObservationModel implementation without changing numerical behavior.
The chain delegates calculate_observation_likelihood to the selected model. Transmission likelihood, P(any missing), COI updates, and population frequency updates remain untouched. Default runtime behavior is identical to today: binary presence/absence barcodes and the same observation likelihood values.
Ship C++ unit tests that compare the wrapped binary model against fixed fixtures from the pre-refactor implementation. The existing R run_mcmc smoke test must pass with no API changes.
Acceptance criteria
Blocked by
None - can start immediately
Parent
#45
What to build
Introduce an observation-model abstraction in the MCMC chain with a narrow interface: log-likelihood of observations given a latent genotype support set and per-sample error parameters, and (later) latent genotype proposal. Move the existing binary TP/TN/FP/FN observation logic behind a
BinaryObservationModelimplementation without changing numerical behavior.The chain delegates
calculate_observation_likelihoodto the selected model. Transmission likelihood, P(any missing), COI updates, and population frequency updates remain untouched. Default runtime behavior is identical to today: binary presence/absence barcodes and the same observation likelihood values.Ship C++ unit tests that compare the wrapped binary model against fixed fixtures from the pre-refactor implementation. The existing R
run_mcmcsmoke test must pass with no API changes.Acceptance criteria
BinaryObservationModel; no scattered duplicate logic in the chaintests/testthat/test-mcmc.Rsmoke test passes unchanged (binary path, default args)Blocked by
None - can start immediately