I have made a model with the following observed value, obs
:
pm.TruncatedNormal("obs", mu=multiplier.T * pred + means_vector, sd=err_sd, observed=self.df['mean_log_gfp_live'].to_numpy(),
lower=0.0, upper=12.0)
I then sampled from the model using sample _prior_predictive()
.
I was quite surprised that many of the sampled values are apparently np.inf
or -np.inf
. Shouldn’t this be impossible because of the truncation? Or at best, shouldn’t this give a runtime error?
When I checked, 1977 of my 5000 samples have at least one of their values (observed
is a vector of 1043 elements) either inf
or -inf
.
Probably this means there’s something wrong with my model, but this also suggests that this variable can behave oddly in prior sampling.