SVGP update equations contain an error
Closed this issue · 1 comments
When we change the inducing points before re-training SVGPs and Deep GPs, we need to update q_mu and q_sqrt such that the posterior distribution is unchanged at the new inducing points.
The current equations only work when the mean function is zero. We need to add a correction term at those places;
(new_q_mu =new_q_mu - model mean prediction at Z)
https://github.com/secondmind-labs/trieste/blob/develop/trieste/models/gpflow/models.py#L1014
(f_mu = f_mu - model mean prediction at Z)
trieste/trieste/models/gpflow/utils.py
Line 330 in a4b25f8
DeepGPs currently do not have this problem because we don't have a scheme to update inducing points.
It is unclear whereas we have a test for whiten_points, but we should definitely have one with a non-zero mean function.
The only test we have for this part of the code is:
trieste/tests/unit/models/gpflow/test_models.py
Line 1431 in a4b25f8
The correct test here is to check that the posterior distribution at the new inducing points is unchanged after you update the model inducing points.