General description of task
The demo https://github.com/CUQI-DTU/CUQIpy/blob/main/demos/demo37_experimental_mcmc_module_Gibbs.ipynb uses NUTS within Gibbs. For the NUTS example, before the fix in #621, the inferred signal is (exec. time ~20 min)
After this fix, the signal is (exec. time ~ 20 min)
Note that this fix not necessarily improve the inference (both inferences looks a bit similar). However, for small number of steps, the old implementation seems to perform better (10 steps).
num_sampling_steps = {
"x" : 1,
"s" : 1
}
sampler = HybridGibbs(target, sampling_strategy, num_sampling_steps)
sampler.warmup(10)
sampler.sample(10)
before fix:

After fix:

This is likely because tuning in NUTS suggests worse time step than the method _find_good_epsilon which is called at the beginning of sampling. Before fixing NUTS statefulness this method seems to be called every time the sampler is re-initialized (each Gibbs step)
Definition of Done (Feature/change)
Definition of Done (Mandatory)
Definition of Done (Optional)
General description of task
The demo https://github.com/CUQI-DTU/CUQIpy/blob/main/demos/demo37_experimental_mcmc_module_Gibbs.ipynb uses NUTS within Gibbs. For the NUTS example, before the fix in #621, the inferred signal is (exec. time ~20 min)
After this fix, the signal is (exec. time ~ 20 min)
Note that this fix not necessarily improve the inference (both inferences looks a bit similar). However, for small number of steps, the old implementation seems to perform better (10 steps).
before fix:

After fix:

This is likely because tuning in NUTS suggests worse time step than the method _find_good_epsilon which is called at the beginning of sampling. Before fixing NUTS statefulness this method seems to be called every time the sampler is re-initialized (each Gibbs step)
Definition of Done (Feature/change)
Definition of Done (Mandatory)
Definition of Done (Optional)