EngineBuilder.add_burnin()#
- EngineBuilder.add_burnin(duration, thinning=1)[source]#
Adds burnin epochs.
Note that the order in which you add epochs matters. Adaptation epochs should usually come before all other epochs.
Warning
If you use any MCMC kernel that expects hyperparameter tuning an adaptation phase, like
NUTSKernel,HMCKernelor our default implementation ofIWLSKernel, you must add an adaptation phase viaadd_adaptation(). Pure burnin epochs like the ones added withadd_burnin()do not perform any adaptation during warmup. They are only applicable if you exclusively use MCMC kernels that do not require adaptation, such asGibbsKernelor classic, untuned IWLS kernels viaIWLSKernel.untuned().See also
add_posteriorFor adding posterior epochs.
add_burninFor adding burnin epochs.
add_adaptationFor adding adaptation epochs.
set_durationAn alternative method to specify adaptation and posterior epochs, see notes for details.
Notes
There are some differences in the details between the methods
add_posterior(),add_adaptation(),add_burnin()andset_duration().set_duration()overwrites all existing epochs with the epochs defined in this method. In contrast, theadd_methods only add additional epochs that are appended to the potentially existing ones.set_duration()sets both adaptation and posterior epochs, while eachadd_method only adds epochs of one type.set_duration()has an argumentterm_durationthat defines the number of samples drawn in the final fast adaptation epoch, and it defaults to a fixed value of 50 samples. In contrast,add_adaptation()defines the number of samples drawn in the final fast adaptation epoch as a fraction of the total number of adaptation samples, and allows users to change this fraction via the argumentterm. As a result, ifadd_adaptation()is used, the length of the final fast adaptation phase increases automatically, if the total number of warmup samples increases, while it remains constant ifset_duration()is used.