Hi,
I’m testing a simple model, where the prior for theta is Uniform in 0,1 and the likelihood is uniform in 0 theta. When I run the code, I obtain SamplingError("Bad initial energy")
.
with pm.Model() as basic_model:
theta = pm.Uniform('theta', lower=0, upper=1)
y = pm.Uniform('y', lower=0, upper=theta,
observed=[0.49131995252993826, 0.2774397121516236, 0.5381935236905224, 0.19753121107715765])
print(basic_model.check_test_point())
trace = pm.sample(1000, progressbar=True, chains=1, random_seed=1)
The output for check_test_point
is
theta_interval__ -1.39
y -inf
Name: Log-probability of test_point, dtype: float64
What am I doing wrong?
Thanks in advance