Hi,
I was running the Gaussian process example code of pymc3 and found that many attribute are not in this module.
X = np.linspace(0, 1, 10)[:, None]
with pm.Model() as model:
# Specify the covariance function.
cov_func = pm.gp.cov.ExpQuad(1, 0.1)
# Specify the GP. The default mean function is `Zero`.
gp = pm.gp.Marginal(cov_func=cov_func)
# Place a GP prior over the function f.
sigma = pm.HalfCauchy("sigma", beta=3)
y_ = gp.marginal_likelihood("y", X=X, y=y, noise=sigma)
AttributeError: module 'pymc3.gp' has no attribute 'Marginal'
What version of PyMC3 are you running? How did you install it?
It is version 3.1 and I installed by pip.
That makes sense; gp.Marginal was introduced after the 3.1 release. Try installing the master branch instead:
pip install git+https://github.com/pymc-devs/pymc3
It works! Thanks!
Most helpful comment
That makes sense;
gp.Marginalwas introduced after the 3.1 release. Try installing the master branch instead: