I was playing with additive Gaussian processes similar to documentation here:
but I am having issues while sampling from the conditional distribution for f1_star and f2_star.
My notebook can be found here:
with pm.Model() as model: sigma1 = pm.HalfCauchy("η1", beta=5) sigma2 = pm.HalfCauchy("η2", beta=5) ls1 = pm.HalfCauchy('ls1', beta=10) ls2 = pm.HalfCauchy('ls2', beta=10) cov1 = sigma1 * pm.gp.cov.ExpQuad(2, ls=ls1, active_dims=) cov2 = sigma2 * pm.gp.cov.ExpQuad(2, ls=ls2, active_dims=) gp1 = pm.gp.Marginal(cov1) gp2 = pm.gp.Marginal(cov2) gp = gp1 + gp2 sigma = pm.HalfCauchy("sigma", beta=3) f = gp.marginal_likelihood("f", X_2D_train, y, sigma) trace = pm.sample(1000, chains=4) with model: f_star = gp.conditional("f_star", X_2D_star)
TypeError: For compute_test_value, one input test value does not have the requested type.
The error when converting the test value to that variable type:
Wrong number of dimensions: expected 1, got 2 with shape (1000, 1000).
X_2D_star has shape (1000,2). So, I think I am using additive GP wrong. Can someone please help me with this?