gpytorch
gpytorch copied to clipboard
Implementing Gibbs Kernel
I was going through the available kernels in GpyTorch and couldn’t find the Gibbs covariance function given as:
Would it be possible to have this kernel implemented in GPyTorch?
Yes - we would accept a PR for this kernel function. See these docs about implementing a custom kernel.
@gpleiss I have created the kernel function. Are there specific tests to test my code?
@atharvahans1 We have a series of base kernel test cases that you can extend here: https://github.com/cornellius-gp/gpytorch/blob/master/gpytorch/test/base_kernel_test_case.py
If after implementing the two abstract methods your kernel passes those tests, it's an indication that most model types in GPyTorch will work with your kernel.
See here for an example implementation of the test cases on a different kernel: https://github.com/cornellius-gp/gpytorch/blob/master/test/kernels/test_arc_kernel.py
Obviously you can add additional test cases beyond these if you wish, but these test cases verify that your kernel returns a sensible output given the various types of possible input you might get.
@atharvahans1 did you finish this ?
@atharvahans1 did you finish this ?
bump
bump²
This is a duplicate of https://github.com/cornellius-gp/gpytorch/issues/671
Closed because it is a duplicate.