Gpytorch: [Question] What is the difference between "model(test_x)" and "likelihood(model(test_x))" for prediction?

Created on 31 Dec 2020  路  3Comments  路  Source: cornellius-gp/gpytorch

Hi,
I am trying regression with GPyTorch following the example in the documentation.

In the example, there are two ways to get mean and variance of prediction.

1)

f_preds = model(test_x)

2)

y_preds = likelihood(model(test_x))

I noticed that the mean of prediction is the same when I use model(test_x) and likelihood(model(test_x)), but variance is different. I didn't understand the reason.
More generally, I didn't understand the difference between model(test_x) and likelihood(model(test_x)).

Could you please guide me on this issue?

Most helpful comment

In the regression setting, the former does not include the likelihood noise (it is the latent variance) and the latter does include it.

All 3 comments

In the regression setting, the former does not include the likelihood noise (it is the latent variance) and the latter does include it.

Thank you.

Is likelihood noise similar to the noise that we can add to the kernel? For example, when I define a kernel as below:

RBFKernel() + WhiteNoiseKernel()

I checked the list of kernels. I couldn't find "WhiteNoiseKernel()". It seems that GPyTorch adds noise automatically to the kernel. Is my understanding correct?

Philosophically, it is different (is the "noise" due to your data observations or due to your uncertainty about your model). Practically, it is the same.

WhiteNoiseKernel has been replaced by FixedNoiseGaussianLikelihood. This adds different observational noise for each data point. The standard GaussianLikelihood adds the same observational noise to each data point.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dhruvbalwada picture dhruvbalwada  路  3Comments

tzoiker picture tzoiker  路  6Comments

dialuser picture dialuser  路  5Comments

Galto2000 picture Galto2000  路  6Comments

stanbiryukov picture stanbiryukov  路  6Comments