I’m trying to get accustomed to pymc3 and bayesian models in general. In particular right now I’m trying to fit a michaelis-menten-type model to my data, with a normal variance around the deterministic model for the mean with a standard deviation of ϵ:
My own data is pretty big, ~2000 points, so here is a toy example that seems to repeat the error (I assigned k = 100 for the moment):
xx = pd.Series(range(0,3500,100)) yy_real = xx/(xx + 100) εε = np.random.normal(0, 0.05, size=len(xx)) yy = yy_real + εε
(Image of data attached)
with pm.Model() as model_g: ε = pm.Normal('ε', mu=0, sd = 0.05) y_pred = pm.Normal('y_pred', mu= xx/(xx+100), sd=ε, observed=yy) trace_g = pm.sample(2000, tune=1000)
This returns a long error that boils down to the following error early while running the NUTS sampler:
RuntimeWarning: Mean of empty slice.
And finally with:
Bad initial energy, check any log probabilities that are inf or -inf, nan or very small:
So I guess I am generating negative infinity values somehow in my posterior? Picture of toy data and the curve I’d like to fit:
Thanks in advance.