(variance: TensorType, lengthscales: TensorType)
| 103 | |
| 104 | @pytest.mark.parametrize("variance, lengthscales", [[2.3, 1.4]]) |
| 105 | def test_rq_1d(variance: TensorType, lengthscales: TensorType) -> None: |
| 106 | kSE = SquaredExponential(lengthscales=lengthscales, variance=variance) |
| 107 | kRQ = RationalQuadratic(lengthscales=lengthscales, variance=variance, alpha=1e8) |
| 108 | rng = np.random.RandomState(1) |
| 109 | X: AnyNDArray = rng.randn(6, 1).astype(default_float()) |
| 110 | |
| 111 | gram_matrix_SE = kSE(X) |
| 112 | gram_matrix_RQ = kRQ(X) |
| 113 | assert_allclose(gram_matrix_SE, gram_matrix_RQ) |
| 114 | |
| 115 | |
| 116 | @check_shapes( |
nothing calls this directly
no test coverage detected
searching dependent graphs…