There are three phases for HMC warm-up, the length of which can be controlled using
init_buffer = 75,
term_buffer = 50 and
window = 25, where I’ve specified Stan’s default values. It’s not quite clear to me what these values represent. Is it the (unnormalized) proportion of time spent for each phase? Based on figure 34.1 in the Stan manual, matters look a bit more complicated.
According to the proposed interpretation, for 1000 warmup iterations, we have 500 iterations doing the initial warmup, 167 during the window and 334 during the final buffer. But I’m not convinced this is correct.
My goal is to make the third phase longer to fit a model, where the step size seems to large (compared to other chains that run successfully).
the step-size is adjusted during all phases according to @betanalpha -
When restricting only to the nominal dynamic HMC implementation the three
phases correspond to
Initial Buffer: adapting the step size only to give the chains time to get close to the
typical set, with no guarantee that they will reach the typical set
Windowed: adapting the step size continuously while adapting the inverse metric at
the end of increasing windows of iterations
Terminal Buffer: adapting the step size with the final inverse metric configuration fixed
no - the
term_buffer are the totals.
only the the
window is the number that keeps doubling.
The adaptation parameters were all fully documented in the original CmdStan documentation; unfortunately the RStan and PyStan interfaces did not propagate this documentation and for some unfortunate reason was removed from the CmdStan repository and Stan website. Fortunately the documentation is preserved in the git history – see https://github.com/stan-dev/cmdstan/blob/v2.15.0/doc/cmdstan-guide-2.15.0.pdf.
The adaptation procedure and the meaning of each parameter is detailed started on Page 43 (see also Figure 8.3).
For the exact logic on how the final slow window is calculated (to fit into the total number of warmup iterations) see Lines 105-109 of https://github.com/stan-dev/stan/blob/develop/src/stan/mcmc/windowed_adaptation.hpp.