tpapp / DynamicHMC.jl

Implementation of robust dynamic Hamiltonian Monte Carlo methods (NUTS) in Julia.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: restrict the domain that the sampler moves

wupeifan opened this issue · comments

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