This commit is contained in:
Contramundum committed 2023-08-30 12:56:50 +09:00
1 parent 857122d5b1
commit 012b71a42a
1 file changed
+4 -1
+4 -1
View File
@@ -161,7 +161,10 @@ class _SampledGP(botorch.models.model.Model):
class _PreferentialGP:
def _kernel_func(
self, x1: torch.Tensor, x2: torch.Tensor, lengthscale: torch.Tensor,
self,
x1: torch.Tensor,
x2: torch.Tensor,
lengthscale: torch.Tensor,
) -> torch.Tensor:
# Matern 3/2 kernel
d = math.sqrt(3) * torch.cdist(x1 / lengthscale, x2 / lengthscale)