question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

f_preds = model(test_x)

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?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jacobrgardnercommented, Dec 31, 2020

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

1reaction
varunagrawalcommented, Dec 12, 2022

@gpleiss I was gonna do it even if you hadn’t asked. I may need a couple of days though, lots of things need finishing up currently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6.2.3 - More on Model-fitting | STAT 504
If we fit both models, we can compute the likelihood-ratio test (LRT) ... Larger differences in the "-2 Log L" values lead to...
Read more >
How are the likelihood ratio, Wald, and Lagrange multiplier ...
All three tests use the likelihood of the models being compared to assess their fit. The likelihood is the probability the data given...
Read more >
The likelihood ratio test: relevance and application
The likelihood ratio test compares how well a model with a potential predictor explains an outcome, compared to a model without the predictor....
Read more >
linear model - Likelihood ratio test to compare two predictions
The likelihood-ratio test is appropriate only if the two models you are comparing are nested, i. e., if one can be retrieved from...
Read more >
Likelihood Ratio Test - an overview | ScienceDirect Topics
More precisely, the likelihood ratio test is based on the difference in minimum objective function value (O) between models, with and without the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found