Hi numpyro community
I am new to numpyro and also just started my Bayesian career.
So, this forum is really helpful - thanks a lot!
Using the model below, I am trying to attribute partial amounts of total volumes (across different regions) to different customer classes.
Now, I would like to constrain my customer class parameters such that
C1 > C2 > C3 ... > C8 > 0
From reading it seems that parameter constraints may lead to inefficient MCMC sampling.
Also, I have the feeling that a different parameterization of my model might be part of the solution.
Unfortunately however, I was not able to find a valid solution, yet.
So any help is much appreciated!
# customer class labels
reg_labels = ["C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8"]
def model(X, volume):
betas = []
for reg_label in reg_labels:
betas.append(numpyro.sample(f"b{reg_label}", dist.Uniform(0, 20000)))
sigma = numpyro.sample("sigma", dist.Exponential(1.0))
mu = jnp.dot(X, jnp.array(betas))
numpyro.sample("obs", dist.Normal(mu, sigma), obs=volume)
PS: Any additional improvement hints regarding my basic simple bayesian model are much appreciated, too!