gpytorch
gpytorch copied to clipboard
[Feature Request] Implementing Gibbs' kernel
A widely used kernel is Gibbs' covariance function given by (4.32), e.g. with a modified tanh lengthscale. Would it be possible to have this kernel implemented in GPyTorch? It would certainly be helpful for comparison with other existing codes and extend wider applicability of the available regression tools in GPyTorch.
@AbhilashMathews we're definitely open to it! We're a bit swamped right now, but if you want to submit a PR, that would be great :)
(You can probably copy what's done for the periodic kernel. Also you'd need to write a test and make sure it's added to the list of kernels in the docs.)
Hey @AbhilashMathews, did you manage to get the Gibbs kernel implemented?
Hey, can I try this?
@Kkuntal990 hi - I just checked ur code, I think the prod_term calc is wrong for multi-dimensional inputs.
What makes this tricky to add in, and what's missing from the implementation in the PR, is the length scale being a function of x. This adds a lot of potential use cases to support. Maybe you have a strong prior that your length scale should follow a normal distribution around x', maybe you discretise the input space and learn a grid of length scales as hyperparameters, or maybe you use an NN to learn the function entirely.