Here is the model I want to describe in pymc3。 我写了以下代码,但它们不起作用。
with pm.Model() as model:
bernoulli_parameters = np.empty([N, N], dtype=object)
for n in range(N):
for m in range(N):
if (z[n,m]==z[n,m]):
bernoulli_parameters[n,m] = myBeta[z[n,m]]
else:
bernoulli_parameters[n,m] = epsilon
bernoulli_parameters_vector=bernoulli_parameters.reshape(1,N*N)
D = pm.Bernoulli('D',
p=bernoulli_parameters_vector, observed=Topology_Data_Vector)