3

I am using GPyTorch to make a Gaussian Process (GP) Regressor using a custom mean function (an n-degree polynomial with bias) and a combination of kernels (Gaussian^2*Linear).

I was wondering if it is possible to extract the parameters from the trained model that can be used to manually calculate the predicted mean (and variance) of new points. And if so how this is done.

I have tried extracting the bias and weigths from my mean function by calling the following:

bias = self.model.mean_module.bias.item()
weights = self.model.mean_module.weigths

which does give me a bias and the correct number of weights I expect from the n-degree polynomial mean function. But when I compare the predictions from the GP regressor and these parameters they do not match.

TimLevert
  • 31
  • 3

0 Answers0