Sum of kernels over different active dimensions

hello. I’m currently trying to build my own kernel using the Sum class. I’m trying to add two kernels in different tensor spaces, i.e. simply adding the kernel defined in the x-axis direction to the kernel defined in the y-axis to form a two-dimensional kernel. but I’m not sure that what the Sum class implements is the addition in the same space, i.e. two one-dimensional kernels. or addition in a different tensor space, i.e. increasing the dimensionality of the kernel.

Could you clarify your question? Are you asking about the Pyro Gaussian Process module?

yes. I’ve just started using pyro and I’d like to design a 2D kernel for GP. I looked at some pyro examples and the source code of pyro on github. I noticed that I can use the class Sum to merge two kernels into one, but what I don’t understand is whether this operation is done in the same space or in two tensor spaces.



I think these two figures explain this better. When two kernels are added in the same space, the dimension of the new kernel will not increase, but if the kernel is added in two different spaces, the dimension of the kernel will become the sum of the two dimensions. My question is that the class Sum seems to take addition in the same space, if I want to add kernels in two different spaces, what should I do?

I see. You can specify active_dims in the constructor of each kernel to achieve it.

Thank you for your help. Your answers have helped me a lot.