Hi! Thank you for the quick reply.
I am trying out the first option. I have reshaped my data/prediction with the shape [6,6,11] for 6 batches, 6 species and 11 timepoints.
Now, I don’t know exactly how to define sigma.
I have tried defining the shape to (6,11):
sigmas = pm.HalfNormal("sigmas", sigma=0.1, shape=(6,11))
# Likelihood
pm.Normal("Y_obs", mu=ode_solution, sigma=sigmas, observed=observed_exp_3d)
and I got a “Segmentation fault” error.
If I understand your advice, should I define sigma per species, say, sigmas1 for species1 with a shape of (1,11) and set up my likelihood as
sigmas1 = pm.HalfNormal("sigmas1", sigma=0.1, shape=(1,11))
sigmas2 = pm.HalfNormal("sigmas2", sigma=0.1, shape=(1,11))
sigmas3 = pm.HalfNormal("sigmas3", sigma=0.1, shape=(1,11))
sigmas4 = pm.HalfNormal("sigmas4", sigma=0.1, shape=(1,11))
sigmas5 = pm.HalfNormal("sigmas5", sigma=0.1, shape=(1,11))
sigmas6 = pm.HalfNormal("sigmas6", sigma=0.1, shape=(1,11))
# Likelihood
pm.Normal("Y_obs", mu=ode_solution, sigma=[sigmas1,sigmas2,sigmas3,sigmas4,sigmas5,sigmas6], observed=observed_exp_3d)
I tried this but it also doesn’t seem to work. I think the error has to do with my sigma definition.
I want the sigma to be the same across all batches per species and per time point, so I should have a total sigmas of 6 species x 11 timepoints.
Thanks.