From 25db8293f600c142116b3eefd9b9d2ab900f7b2c Mon Sep 17 00:00:00 2001 From: Thomas Pinder Date: Thu, 30 Nov 2023 09:24:40 +0100 Subject: [PATCH] Fix broken test --- README.md | 11 ----------- tests/test_objectives.py | 9 +++++++-- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 3dfe2de9..3917f14d 100644 --- a/README.md +++ b/README.md @@ -46,11 +46,7 @@ started is to As a contributor to GPJax, you are expected to abide by our [code of conduct](docs/CODE_OF_CONDUCT.md). If you feel that you have either experienced or witnessed behaviour that violates this standard, then we ask that you report any such -<<<<<<< HEAD -behaviours though [this form](https://jaxgaussianprocesses.com/contact/) or reach out to -======= behaviours through [this form](https://jaxgaussianprocesses.com/contact/) or reach out to ->>>>>>> ac475762faa0cb9c64a773d5d9d3506d1a3ebdf2 one of the project's [_gardeners_](https://docs.jaxgaussianprocesses.com/GOVERNANCE/#roles). Feel free to join our [Slack @@ -139,17 +135,10 @@ D = gpx.Dataset(X=x, y=y) # Construct the prior meanf = gpx.mean_functions.Zero() kernel = gpx.kernels.RBF() -<<<<<<< HEAD prior = gpx.gps.Prior(mean_function=meanf, kernel = kernel) # Define a likelihood likelihood = gpx.likelihoods.Gaussian(num_datapoints = n) -======= -prior = gpx.Prior(mean_function=meanf, kernel=kernel) - -# Define a likelihood -likelihood = gpx.Gaussian(num_datapoints=n) ->>>>>>> ac475762faa0cb9c64a773d5d9d3506d1a3ebdf2 # Construct the posterior posterior = prior * likelihood diff --git a/tests/test_objectives.py b/tests/test_objectives.py index 02aee269..fbb53f14 100644 --- a/tests/test_objectives.py +++ b/tests/test_objectives.py @@ -6,6 +6,8 @@ import gpjax as gpx from gpjax.dataset import Dataset +from gpjax.gps import Prior +from gpjax.likelihoods import Gaussian from gpjax.objectives import ( ELBO, AbstractObjective, @@ -90,7 +92,8 @@ def test_conjugate_loocv( # Build model p = Prior( - kernel=gpx.RBF(active_dims=list(range(num_dims))), mean_function=gpx.Constant() + kernel=gpx.kernels.RBF(active_dims=list(range(num_dims))), + mean_function=gpx.mean_functions.Constant(), ) likelihood = Gaussian(num_datapoints=num_datapoints) post = p * likelihood @@ -176,7 +179,9 @@ def test_collapsed_elbo( assert evaluation.shape == () # Data on the full dataset should be the same as the marginal likelihood - q = gpx.CollapsedVariationalGaussian(posterior=p * likelihood, inducing_inputs=D.X) + q = gpx.variational_families.CollapsedVariationalGaussian( + posterior=p * likelihood, inducing_inputs=D.X + ) mll = ConjugateMLL(negative=negative) expected_value = mll(p * likelihood, D) actual_value = negative_elbo(q, D)