How to do inference with bounded constraints


#1

Hello,

I am trying to solve a specific problem and I am wondering IF pyro is the right tool for it and how to implement it.
I can simplify the problem to something like this:
I have 5 continuous variables: A, B, C, D, E, but A = 2*B+C and C = D+E
So, they are only 3 independent variables (B,D,E).

I know that B,D,E are gaussian distributed (so give numbers, let say that the prior is µ=0.5 and sigma=0.5), and all three must be >0.
and I know that A=1 (it’s a constraint) and that B is in [0,0.5]
how can I compute the posterior on B,C,D,E for this problem that will fit my constraints

thanks a lot for your help, as I don’t know how to start coding this.
Loic,


#2

Hi @loicus, currently truncated normal distribution (which has positive support) is not yet implemented in PyTorch and Pyro. I think that you would need to hack around a bit by using other priors instead. To find the posterior, you can use SVI or MCMC as in bayesian regression tutorial.


#3

Are there plans to implement truncation (both max and min) for the different distributions? It seems like an important feature for practical appliations.