@@ -35,23 +35,40 @@ function build_latent_gp(theta)
3535 return LatentGP (GP (kernel), dist_y_given_f, 1e-8 )
3636end
3737
38+ """
39+ test_approx_lml(approx)
40+
41+ Test whether in the conjugate case `approx_lml(approx, LatentGP(f,
42+ GaussianLikelihood(), jitter)(x), y)` gives approximately the same answer as
43+ the log marginal likelihood in exact GP regression.
44+
45+ !!! todo
46+ Not yet implemented.
47+
48+ Will not necessarily work for approximations that rely on optimization such
49+ as `SparseVariationalApproximation`.
50+
51+ !!! todo
52+ Also test gradients (for hyperparameter optimization).
53+ """
54+ function test_approx_lml end
55+
3856"""
3957 test_approximation_predictions(approx)
4058
4159Test whether the prediction interface for `approx` works and whether in the
4260conjugate case `posterior(approx, LatentGP(f, GaussianLikelihood(), jitter)(x), y)`
43- gives approximately the same answer as exact GP regression.
61+ gives approximately the same answer as the exact GP regression posterior .
4462
4563!!! note
4664 Should be satisfied by all approximate inference methods, but note that
4765 this does not currently apply for some approximations which rely on
4866 optimization such as `SparseVariationalApproximation`.
4967
50- !!! note
51- Does not test `approx_lml`!
52-
5368!!! warning
5469 Do not rely on this as the only test of a new approximation!
70+
71+ See `test_approx_lml`.
5572"""
5673function test_approximation_predictions (approx)
5774 rng = MersenneTwister (123456 )
0 commit comments