AdvancedHMC.jl
AdvancedHMC.jl copied to clipboard
Progress message `ratio_divergent_transitions_during_adaption` bug
This is difficult to demonstrate, but I believe the value of ratio_divergent_transitions_during_adaption
printed during sampling when progress=true
is currently incorrect.
The behaviour I've seen is:
- During adaptation, numerical errors are encountered causing
ratio_divergent_transitions_during_adaption
to increase - By the end of adaptation, the numerical errors stop
- Sampling continues after adaptation and
ratio_divergent_transitions
stays zero. -
ratio_divergent_transitions_during_adaption
starts to drop (even though adaptation is now finished!) until it reaches a lower value, eg 50% lower if there are equal numbers of samples during and after adaptation.
I couldn't find the right location in the code, but I believe that ratio_divergent_transitions_during_adaption
might be calculating the ratio using the total number of samples so far, and not stopping updating after adaptation completes.