Predictive and sigma

I want to make posterior predictions using Predictive but I don’t want to add the posterior sigma noise to predictions. Would the below be a good way to achieve this in my model function?

def model(x=None, y=None):
  mu = ...
  if y:
    pred = numpyro.sample(..., dist.Normal(mu, sigma), obs=y)
   return mu # E(y|x)

I think you can use numpyro.deterministic to record any value in the model (e.g. in this case mu).

1 Like