Hello cluhmann, sorry for the delay! I am using the same example that appears at the link: “https://docs.pymc.io/api/model.html#pymc3.model.set_data”:
import pymc3 as pm
print(f"Running on PyMC3 v{pm.__version__}")
with pm.Model() as model:
x = pm.Data('x', [1., 2., 3.])
y = pm.Data('y', [1., 2., 3.])
beta = pm.Normal('beta', 0, 1)
obs = pm.Normal('obs', x * beta, 1, observed=y)
trace = pm.sample(1000, tune=1000)
with model:
pm.set_data({'x': [5., 6., 9.]})
y_test = pm.sample_posterior_predictive(trace)
y_test['obs'].mean(axis=0)
The output shows:
Running on PyMC3 v3.6
File "C:/Backup_Fernando/DeepLearning/Spyder/teste_set_data2.py", line 14, in <module>
x = pm.Data('x', [1., 2., 3.])
AttributeError: module 'pymc3' has no attribute 'Data'
How can I fix this?
Thanks a lot for any help!!