bartz.mcmcloop.StatsAccumulator¶
- class bartz.mcmcloop.StatsAccumulator(sums, count)[source]¶
Running average of the forest diagnostics shown during the MCMC.
When enabled, it sums the per-iteration statistics so a report shows their average over the iterations since the previous report. When disabled it carries no running state and a report shows the latest iteration only.
- sums: dict[str, Float32[Array, '']] | None¶
Running sums of the averaged statistics, or
Nonewhen disabled.
- count: Int32[Array, '']¶
Number of iterations accumulated since the last reset.
- classmethod initial(state, *, enabled)[source]¶
Create a zeroed accumulator, inert unless
enabled.- Return type: