New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
predict_y and predict_log_density support for full_cov or full_output_cov #1461
Comments
Thanks for your excellent bug report. You are completely right: the likelihood variance is incorrectly added to all the elements of the covariance matrix whereas it should only have been added to the diagonal of the matrix. This is, for example, caused by unsolicited broadcasting in the As GPflow is an open source project we would very much appreciate if you could help us create a fix for this bug by submitting a PR. My initial plan would be to pass a keyword argument Feel free to join our slack workspace (see README for details on how to join) if you want to discuss this in more detail. |
Hi, ok, I can fix this. I'll try to find time this week but may not be possible with looming deadlines. I'll also add a test that verifies that predict_y works for all configs of full_cov and full_output_cov (for multi output gp). I'll reach out to you on slack if there's a significant delay. Let me know if there's a rough date by which you need this in. Thanks |
Looking forward to your PR - thanks. There is no deadline for this, but I'll get in touch if someone else wants to pick up this ticket before you start your work. The minimal example you wrote above would be an ideal candidate to add to your unit tests. |
@mohitrajpal1 - would you still be up for looking at how to implement this ? |
@st-- Hi sorry. Yes I can do this shortly. Things got lost due to cascading deadlines. Expect a PR next week. |
Great! Looking forward to it. |
With latest version of GPFlow 2.0.2, calling predict_y with a SVGP model with full_cov = True results on a covariance matrix where the likelihood noise value is added to every element in the covariance matrix, as opposed to only the diagonal as expected.
From looking at the code, this happens because SVGP does not implement predict_y, but inherits it from base class. However, the base class implementation doesn't seem to be correct with full_cov = True.
To reproduce
Expected behavior
Expected behavior is for off diagonals to match that of predict_f, however this isn't the case. The last line of the above snippet should output 0.
System information
The text was updated successfully, but these errors were encountered: