You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a Normal distribution for the latent function, and a datum Y, compute the log predictive density of Y,
i.e. if
q(F) = N(Fmu, Fvar)
and this object represents
p(y|F)
then this method computes the predictive density
log ∫ p(y=Y|F)q(F) df
:param X: input tensor
:param Fmu: mean function evaluation tensor
:param Fvar: variance of function evaluation tensor
:param Y: observation tensor
:returns: log predictive density
Sorry for the delayed response! Good spot: it certainly looks like we're returning the predictive log density rather than the log predictive density as claimed in the docstring. I will check with someone who understands this better than me and post an update...
Ok, my understanding is that the docs are correct but perhaps incomplete. The code is calculating the log predictive density for each output and summing them (equivalent to the the log of the product). The integral alluded to in the docs is actually inside logdensities.gaussian. I think this corresponds to equation 2.9 in https://gaussianprocess.org/gpml/chapters/RW2.pdf. The calculation itself certainly seems to corresponds to equation 2.34 (though positive rather than negative).
Documentation/tutorial notebooks
When comparing the documentation of "predict_log_density" to source code, I found the following statement:
while the code for predict_log_density in the Gaussian class is:
which, as far as I understand, corresponds to ∫ log p(y=Y|F)q(F) df (i.e. expected log-density) ?
Is this a lack of consistency between the documentation and code, or am I just l misunderstanding ?
Thanks and cheers!
The text was updated successfully, but these errors were encountered: