What we have already
In CUQIpy, gradient-based sampling methods (including NUTS) can use FD gradient. This is done by enabling the FD gradient for the target before passing it to the sampling methods. E.g. for the posterior object posterior, one can add the line
posterior.enable_FD()
Before passing it to the sampler.
What is missing
Using NUTS (or any other gradient-based sampling method) within HybridGibbs and enabling FD approximation in the target does not work at the moment. One solution is implemented in the associated PR #492, but it is worth thinking about what is the best approach to achieve that (e.g. modifying Gibbs instead of NUTS? or modifying all gradient-based samplers)
DoD:
[ ] An approach of implementing the feature discussed above is
Description:
What we have already In CUQIpy, gradient-based sampling methods (including NUTS) can use FD gradient. This is done by enabling the FD gradient for the target before passing it to the sampling methods. E.g. for the posterior object
posterior
, one can add the lineBefore passing it to the sampler.
What is missing Using NUTS (or any other gradient-based sampling method) within HybridGibbs and enabling FD approximation in the target does not work at the moment. One solution is implemented in the associated PR #492, but it is worth thinking about what is the best approach to achieve that (e.g. modifying Gibbs instead of NUTS? or modifying all gradient-based samplers)
DoD: