Add base kernel test coverage for other matern nu values
@@ -7,6 +7,22 @@ from gpytorch.kernels import MaternKernel
from test.kernels._base_kernel_test_case import BaseKernelTestCase
+class TestMatern25BaseKernel(unittest.TestCase, BaseKernelTestCase):
+ def create_kernel_no_ard(self, **kwargs):
+ return MaternKernel(nu=2.5, **kwargs)
+
+ def create_kernel_ard(self, num_dims, **kwargs):
+ return MaternKernel(nu=2.5, ard_num_dims=num_dims, **kwargs)
+
+
+class TestMatern05BaseKernel(unittest.TestCase, BaseKernelTestCase):
+ def create_kernel_no_ard(self, **kwargs):
+ return MaternKernel(nu=0.5, **kwargs)
+
+ def create_kernel_ard(self, num_dims, **kwargs):
+ return MaternKernel(nu=0.5, ard_num_dims=num_dims, **kwargs)
+
+
class TestMaternKernel(unittest.TestCase, BaseKernelTestCase):
def create_kernel_no_ard(self, **kwargs):
return MaternKernel(nu=1.5, **kwargs)
