I currently work with an uncertainty quantification pipeline where I have multiple observations from different experiments at different times, that is, i have different models representing these phenomena.
One of the experiments (which I will call mua
) depends on the parameters that make up the other models (krg
and krw
). However, the observations I have are not about the same observed points (located by the variable sw
), that is, the random variable which represents krg
and krw
cannot be passed directly as it is not estimated over the same set of points.
When I run a Bayesian model with just krw
and krg
or just with mua
I get a great result, but when I couple the observations I can’t evaluate the model. To work around the problem I concatenated the 3 observations as if they were a single array. In this way I got a satisfactory result, but due to the discontinuity of the points I cannot use NUTS and the results are not as good as those obtained using this method.
Can you suggest any strategies to deal with this problem?
Below the code of de model I am running. param_dict
is the dictionary with the PyMC3 random variables and *_obs
are my data observed for different experiments.
with model_pm:
krw_m, krg_m, mua_m = model.randomized( sw_obs, fg_obs, mua_obs, param_dict)
krw_s = pm.HalfNormal('s_krw', sigma=optim.chisqr**(1/2))
krw_rv = pm.Normal('krw', mu=krw_m, sd=krw_s, observed=krw_obs)
krg_s = pm.HalfNormal('s_krg', sigma=optim.chisqr**(1/2))
krg_rv = pm.Normal('krg', mu=krg_m, sd=krg_s, observed=krg_obs)
mua_s = pm.HalfNormal('s_mua', sigma=3)
mua_rv = pm.Normal('mua', mu=mua_m, sd=mua_s, observed=mua_obs)
step = pm.Slice()
trace = pm.sample( 10000, step=step )