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.

[Bug] Negative variances when using fast_pred_var()

See original GitHub issue

🐛 Bug

Seeing negative variances when using fast_pred_var(). Seems to be related to cache-ing: goes away when caches are cleared by using .train().eval(). In addition, when evaluating the variance at some set of points test_x and the evaluating again at a single point in test_x, they may not match.

To reproduce

See attached notebook and the comments there.

** Stack trace/error message **

tensor([ 1.0139e+00,  8.5046e-02,  8.5050e-02,  5.4592e-01,  8.5045e-02,
         1.1338e+00,  2.0938e+00,  2.3304e+00,  2.3283e+00,  9.9273e-01,
         9.6964e-01, -2.7103e+00, -1.7627e+02, -4.9231e+01, -9.5254e-01,
         6.7344e-01,  1.1548e+00,  8.4972e-02,  1.1811e+00,  2.1131e+00])

Expected Behavior

Variances that are positive and match when evaluated in different ways.

System information

Please complete the following information:

  • gpytorch 0.2.1
  • PyTorch 1.0.0a0
  • Linux release 7.5.1804

cc: @Balandat negative_variance.ipynb.txt

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
danielrjiangcommented, Apr 12, 2019

Tested this again on the multi-batch PR and the issue has disappeared!

0reactions
Balandatcommented, Apr 12, 2019

Great. Must have been some weird caching thing that got solved inadvertently…

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] Negative variance when predicting KISS-GP output in ...
The data (4D input) is mapped by the NN to a 1D space and normalized in [0, 1]. Also, I'm using the model...
Read more >
What do negative variances indicate? | AccountingCoach
The negative variances, which are unfavorable in terms of a company's profits, are usually presented in parentheses. On the other hand, positive variances ......
Read more >
Budget Variance: Definition, Primary Causes, and Types
An unfavorable, or negative, budget variance is indicative of a budget shortfall, which may occur because revenues miss or costs come in higher...
Read more >
Finding Your Positive In A Negative Variance - Dynamic Budgets
If the variance was caused by unpredictable economic changes, use that information to re-examine your budget and reforecast your data.
Read more >
A Beginner's Guide to Variance Reports
Positive vs. negative variances. It is interesting to note that the variance is never unidirectional. Especially for budget variance reports, you can have...
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