-
Notifications
You must be signed in to change notification settings - Fork 0
Description
There are some unresolved questions here about what should be the exact formulae used. (will need to discuss with @bob-carpenter)
Here is the bayes-kit implemention, which may have some issues:
https://github.com/flatironinstitute/bayes-kit/blob/main/bayes_kit/ess.py
Here's is the current mcmc-monitor implementation, which may need to be adjusted:
The critical functions in question are
first_neg_pair_start
mcmc-monitor/src/MCMCMonitorDataManager/stats/ess.ts
Lines 72 to 82 in 459e8b6
| export function first_neg_pair_start(chain: number[]): number { | |
| const N = chain.length | |
| let n = 0 | |
| while (n + 1 < N) { | |
| if (chain[n] + chain[n + 1] < 0) { | |
| return n | |
| } | |
| n = n + 1 | |
| } | |
| return N | |
| } |
They way mcmc-monitor does it now, the sigma_sq_hat (I think aka IAT) is never going to be less than 1, which I believe should be a desirable property. But of course we'll want to be consistent with bayes-kit.
tagging: @jsoules @WardBrian