So what do you intend to model?
The problem I see, though I might be wrong, is that you have observed data of shape (2000,) and you put that into an array of distributions with shape (2000,). I guess the program interprets this as 2000 single observations for 2000 variables, which means there is 1 observation for each Geometric. The p you receive is then just the hyperprior of all those individual pm.Geometric objects in the array.
So maybe you intended to do this:
observations_per_variable = 1000
n_variables = 2000
data = [np.random.geometric(i) \
for i in np.random.beta(0.5, 0.5 \
, size=(observations_per_variable,n_variables) \
)]
?
When I did this, though, I got ValueError: Mass matrix contains zeros on the diagonal. , so there must be something else.
I also tried adjusting your alpha and beta priors:
p = pm.Beta('p', pm.HalfNormal('alpha', 1.), pm.HalfNormal('beta', 1.) \
, shape=(1,n_variables))
but still the error.
I’ve never used Geometric, so someone else might help. But maybe you can tell what it is that you actually want to model?
Best,
Falk
(sorry for my lack of deeper knowledge of the seed thing - thanks @junpenglao for putting it right)