Applying two kernels to different part of the training data

Hi all,

My training data includes two different data, e.g., D1 and D2. I stack them together to create training data. For example, D1 is a matrix of 700 x 140 and D2 is a matrix of 700 x 40. So, my training data is 700 x 180. I want to apply different kernels to D1 and D2, e.g., linear kernel to D1 and Rational Quadratic to D2. I used the following commands to define the kernels:

import as gp

kernel1 = gp.kernels.Linear(input_dim=140,active_dims=list(range(0,140)))
kernel2 = gp.kernels. RationalQuadratic (input_dim=40,active_dims=list(range(140,180)))
kernel = gp.kernels.Sum(kernel1, kernel2)

Is it the correct way to achieve my goal?

Thank you.

I think it is the right way to do it. To be sure, you can test for a simple D1=D2=1 case.