gpytorch icon indicating copy to clipboard operation
gpytorch copied to clipboard

Implementing Gibbs Kernel

Open gg2uah opened this issue 3 years ago • 6 comments

I was going through the available kernels in GpyTorch and couldn’t find the Gibbs covariance function given as: Screen Shot 2021-08-02 at 7 58 19 AM Would it be possible to have this kernel implemented in GPyTorch?

gg2uah avatar Aug 02 '21 12:08 gg2uah

Yes - we would accept a PR for this kernel function. See these docs about implementing a custom kernel.

gpleiss avatar Aug 02 '21 17:08 gpleiss

@gpleiss I have created the kernel function. Are there specific tests to test my code?

gg2uah avatar Aug 03 '21 14:08 gg2uah

@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.

jacobrgardner avatar Aug 08 '21 02:08 jacobrgardner

@atharvahans1 did you finish this ?

Kkuntal990 avatar Oct 21 '21 17:10 Kkuntal990

@atharvahans1 did you finish this ?

bump

iwishiwasaneagle avatar Nov 25 '21 14:11 iwishiwasaneagle

bump²

Jordy-VL avatar Jan 17 '22 14:01 Jordy-VL

This is a duplicate of https://github.com/cornellius-gp/gpytorch/issues/671

charliebudd avatar May 18 '23 10:05 charliebudd

Closed because it is a duplicate.

gpleiss avatar May 24 '23 21:05 gpleiss