Is it wrong to expect this very simple model gives me a joint distribution like a line for the posterior? What I get is actually my prior.
import numpy as np
import pymc3 as pm
import theano
import matplotlib.pyplot as plt
#%%
y=4
y_er=.1
y_observed=y_er*np.random.randn(5)+y
#%%
with pm.Model() as m:
a = pm.Uniform('a', 0, 5)
b = pm.Uniform('b', 0, 5)
yhat = a+b
sigma = pm.HalfCauchy('sd', .1)
step=pm.NUTS()
obs = pm.Normal('obs', yhat, sigma,observed=y_observed)
#%%
trace = pm.sample(model=m,draws=2000,tune=1000,skip=500,njobs=1,step=step)
a_pos=trace['a']
b_pos=trace['b']
plt.figure()
plt.scatter(a_pos,b_pos,color='red',alpha=.1)
plt.xlabel('a')
plt.ylabel('b')