Thank you. The covariance functions definitely made life easier. I especially appreciate the flexibility to use higher dimensions of lengthscales. As I just started using theano, I would like to ask if you could help check if I am implementing the set_subtensor function correctly and that it is doing what I am expecting it to do
import pymc3 as pm
import theano.tensor as tt
with pm.model() as model:
l_eta = pm.Uniform('l_eta', lower=0, upper=10,shape=7)
l_delta = pm.Uniform('l_delta', lower=0, upper=10,shape=4)
sigma_eta = (1/lambda_eta) * pm.gp.cov.ExpQuad(input_dim=(p+q), lengthscales=l_eta)
sigma_delta = (1/lambda_delta) * pm.gp.cov.ExpQuad(input_dim=p, lengthscales=l_delta)
# Here x1 is m x 7 matrix and x2 is n x 7 matrix where m > n
cov = sigma_eta(x1)
new_cov = tt.set_subtensor(cov[0:n,0:n],cov[0:n,0:n]+sigma_delta(x2))
y_obs = pm.MvNorma('y_obs', mu=0, cov=new_cov, observed=y)
Thank you in advance