• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

XENONnT / appletree / 32674342016
88%

Build:
DEFAULT BRANCH: master
Ran 23 Aug 2026 11:51PM UTC
Jobs 2
Files 30
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Aug 2026 11:41PM UTC coverage: 87.784% (-0.1%) from 87.909%
32674342016

push

github

web-flow
Accumulate model histograms over repeat_times instead of averaging log likelihoods (#226)

* Accumulate model histograms over repeat_times instead of averaging log likelihoods

BREAKING: changes log_posterior results for repeat_times > 1. Chains produced with
earlier versions sampled a slightly different target and are not reproducible here.

`repeat_times` used to average n log likelihoods. That reduces the variance as 1/n
but leaves the estimator's bias completely unchanged: for a noisy likelihood
estimator Jensen's inequality gives E[log Lhat] = log L - Var/2, and the mean of n
iid log-estimates has exactly the same expectation as one of them. Because that bias
tracks the LOCAL simulation noise, which varies over parameter space, it tilted the
sampler's stationary distribution toward low-noise regions.

Binned likelihoods now accumulate the model histogram over the repeats and take the
Poisson log once on the average, which is equivalent to a single repeat_times-larger
sample: same variance reduction, same cost, same peak memory (only the histogram is
kept, never the events of all repeats at once), and the bias divided by repeat_times.

repeat_times is handed to `Likelihood.get_log_likelihood`, so each class decides how
repeats combine; `LikelihoodLit` is unbinned and keeps averaging its log likelihoods.
`Context.log_posterior` keeps its original loop with one extra argument.

Measured on an SR2 AmBe two-arm fit at the posterior median, 100 evaluations per
configuration, identical simulated events and identical wall time per call:

  pool 1M x repeat 4, averaging logs (old)   mean logP 158833.47 +- 0.423
  pool 1M x repeat 4, accumulating (new)     mean logP 158855.00 +- 0.358
  pool 4M x repeat 1  (reference)            mean logP 158854.75 +- 0.299

The new path removes 21.5 +- 0.55 (39 sigma) of bias and agrees with a genuinely 4x
larger sample to 0.25 +- 0.47. sigma and s/eval are unchanged. Regression:
repeat_times=1 gives 158854.65 +- 0.555, m... (continued)

20 of 25 new or added lines in 2 files covered. (80.0%)

3169 of 3610 relevant lines covered (87.78%)

1.76 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
93.36
-1.55% appletree/likelihood.py
Jobs
ID Job ID Ran Files Coverage
1 32674342016.1 23 Aug 2026 11:51PM UTC 30
87.78
GitHub Action Run
2 32674342016.2 23 Aug 2026 11:53PM UTC 30
87.78
GitHub Action Run
Source Files on build 32674342016
  • Tree
  • List 30
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c5fa167e on github
  • Prev Build on master (#29304103276)
  • Next Build on master (#33091705392)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc