-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to use combination of multiple kernels ? #2
Comments
Hi, self.spatio_kernel = gpytorch.kernels.ScaleKernel(
RBFKernelForConvexityConstraints(constrained_dims=constrained_dims,
ard_num_dims=self.spatio_dims,
active_dims=range(self.spatio_dims),
lengthscale_prior=lengthscale_hyperprior,
lengthscale_constraint=lengthscale_constraint),
...
self.covar_module = self.spatio_kernel * MaternKernel(...) + RBFKernel(...) This way, your first RBF kernel is constrained and the others are not. Unfortunately, all the derivatives of the kernels are all hardcoded. If you want a constrained Matern kernel you would have to do this as well... |
Thanks for your response. I was wondering if there is a way to put data dependent constraints on function. I have a four dimensional function x=[x1,x2,x3,x4]. I would want to put constraints such as f(x2)>f(x'2) for x2>x'2. I also want to put bound constraints which are data dependent such as f(x1)<x1 for different values of x1. Is there any way to do that with your code? |
No, unfortunately, monotonicity constraints as well as bounds on the predictions are currently not implemented. One can however extend the code to do this. I would suggest to first look at the repo of Agrell (2019) (here) and then reimplement the stacking of matricies using this code base. :) |
Hi,
Thanks very much for this code implementation. I was wondering if there is any way to use combination of different kernels like (Krbf*Kmatern+Krbf) within the same code ??
The text was updated successfully, but these errors were encountered: