However I get an exception: module ‘pymc3.gp’ has no attribute ‘GP’
on this line in the example code:
y_obs = pm.gp.GP*(‘y_obs’, cov_func=f_cov, sigma=s2_n, observed={‘X’:X, ‘Y’:y})
import numpy as np
import pymc3 as pm
# A one dimensional column vector of inputs.
X = np.linspace(0, 1, 10)[:,None]
with pm.Model() as marginal_gp_model:
# Specify the covariance function.
cov_func = pm.gp.cov.ExpQuad(1, ls=0.1)
# Specify the GP. The default mean function is `Zero`.
gp = pm.gp.Marginal(cov_func=cov_func)
# The scale of the white noise term can be provided,
sigma = pm.HalfCauchy("sigma", beta=5)
y_ = gp.marginal_likelihood("y", X=X, y=y, noise=sigma)