tpapp / DynamicHMC.jl

Implementation of robust dynamic Hamiltonian Monte Carlo methods (NUTS) in Julia.
Other
244 stars 21 forks source link

Question: restrict the domain that the sampler moves #108

Closed wupeifan closed 4 years ago

wupeifan commented 4 years ago

Hi Tamas,

I was wondering whether there are any ways instead of using TransformVariables.jl to restrict the domain where the sampler navigates. For example, instead of R, I just want the sampler to navigate across [0,infty)? If there's no way to restrict the domain of the possible samples, is there a way to define the likelihood function and its gradient to achieve this? Following the example above, would it work if I define the likelihood on (-infty, 0) as 0 and define the gradient as negative infinity? Thanks a lot!

Peifan