I’d like to recode an old pymc partial pooling model in pymc3 :
Here is the model an explanations :
http://sl8r000.github.io/ab_testing_statistics/use_a_hierarchical_model/
I have a very hard time to understand this old pymc syntax :
@pymc.stochastic(dtype=np.float64)
def hyperpriors(value=[1.0, 1.0]):
a, b = value[0], value[1]
if a <= 0 or b <= 0:
return -np.inf
else:
return np.log(np.power((a + b), -2.5))
a = hyperpriors[0]
b = hyperpriors[1]
I think I understand the function (It’s a logp for a pair of a & b parameters), so I guess that I’ll have to translate that in a ‘Deterministic’…
But I totally don’t understant the last 2 lines : It look like a function call but I where are the function parameters ? And what does means the [0] and [1] there?
Any help will be appreciated.