I’m pretty sure I’ve seen expressions involving White Noise in the literature where some additive white noise is included in the kernel. I think this should be possible:
with pymc.Model() as model:
...
k_se = pymc.gp.cov.ExpQuad(10, ls=[1.0]*10)
k_wn = pymc.gp.cov.WhiteNoise(sigma=1)
k = k_se + k_wn
gp = pymc.gp.Latent(cov_func=k)
f = gp.prior("f", X)
...
This raises:
line 189, in <setcomp>
input_dims = {factor.input_dim for factor in factor_list if isinstance(factor, Covariance)}
AttributeError: 'WhiteNoise' object has no attribute 'input_dim'
Not sure why this is happening, these evaluate to the same shape, so elementwise addition should be possible, i.e.
X = np.random.rand(442,10)
k_se.full(X).shape.eval() # 425 x 425
k_wn.full(X).shape.eval() # 425 x 425
Specifically, this line raises:
k=k_se+k_wn