gpytorch icon indicating copy to clipboard operation
gpytorch copied to clipboard

[Feature Request] Implementing Gibbs' kernel

Open AbhilashMathews opened this issue 5 years ago • 5 comments

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 avatar Apr 30 '19 06:04 AbhilashMathews

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

gpleiss avatar May 02 '19 19:05 gpleiss

Hey @AbhilashMathews, did you manage to get the Gibbs kernel implemented?

DimitrisCC avatar Apr 22 '20 13:04 DimitrisCC

Hey, can I try this?

Kkuntal990 avatar Aug 30 '21 16:08 Kkuntal990

@Kkuntal990 hi - I just checked ur code, I think the prod_term calc is wrong for multi-dimensional inputs.

vr308 avatar Sep 17 '21 20:09 vr308

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.

charliebudd avatar May 18 '23 10:05 charliebudd