The acceptance probability does not match the target

Does this mean that my analysis is invalid?

This is for Bayesian Linear Regression.
Thanks.

with pm.Model() as model:
sigma = pm.Uniform('sigma', lower=800, upper=810)
intercept = pm.Uniform('Intercept', lower=0, upper=10)
cost_coeff = pm.Normal('cost_coeff',mu=-1.5,sigma=2)
ad_coeff = pm.Normal('ad_coeff',mu=3,sigma=1)

likelihood = pm.Normal('y', mu=intercept+(cost_coeff*X_train['Cost'])+(ad_coeff*X_train['Ad Responses']),sigma=sigma, observed=y_train)

trace = pm.sample(draws=5000,tune=1000)

Not necessarily, but you can try a few things to get rid of that error. The first thing I would do is tune longer–try 2000 or 3000 iterations instead of 1000. Once tuned you should only need around 1000 draws or so to get decent inference.

4 Likes