Open whungt opened 5 years ago
Hi, you can use "model.inference_method.inference" method; For example:
def test_log_likelihood(model, X_test, ytest): , test_loglikelihood, = model.inference_method.inference(model.kern, X_test, model.likelihood, y_test, model.mean_function, model.Y_metadata) return test_log_likelihood
Note that you need normalize y_test as y_train. (You can use model.normalizer.normalize if you define normalize=True in model parameters.)
Hi guys,
It seems that the objective of the model is the negative log marginal likelihood calculated on training data. Is there any existing function to calculate the marginal likelihood in the testing period? If not, where can we get the covariance matrix to calculate it?
Thanks in advance