MCPcopy
hub / github.com/GPflow/GPflow / test_rq_1d

Function test_rq_1d

tests/gpflow/kernels/test_kernels.py:105–113  ·  view source on GitHub ↗
(variance: TensorType, lengthscales: TensorType)

Source from the content-addressed store, hash-verified

103
104@pytest.mark.parametrize("variance, lengthscales", [[2.3, 1.4]])
105def 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(

Callers

nothing calls this directly

Calls 3

SquaredExponentialClass · 0.90
RationalQuadraticClass · 0.90
default_floatFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…