This commit is contained in:
Alan Saul 2013-10-04 19:31:23 +01:00
parent ec36007564
commit 4738467a95
2 changed files with 17 additions and 3 deletions

View file

@ -94,7 +94,10 @@ class Gaussian(NoiseDistribution):
def _mean(self,gp):
"""
Mass (or density) function
Expected value of y under the Mass (or density) function p(y|f)
.. math::
E_{p(y|f)}[y]
"""
return self.gp_link.transf(gp)
@ -106,7 +109,10 @@ class Gaussian(NoiseDistribution):
def _variance(self,gp):
"""
Mass (or density) function
Variance of y under the Mass (or density) function p(y|f)
.. math::
Var_{p(y|f)}[y]
"""
return self.variance

View file

@ -248,19 +248,27 @@ class NoiseDistribution(object):
def _predictive_mean_analytical(self,mu,sigma):
"""
Predictive mean
.. math::
E(Y^{*}|Y) = E( E(Y^{*}|f^{*}, Y) )
If available, this function computes the predictive mean analytically.
"""
pass
def _predictive_variance_analytical(self,mu,sigma):
"""
Predictive variance
.. math::
V(Y^{*}| Y) = E( V(Y^{*}|f^{*}, Y) ) + V( E(Y^{*}|f^{*}, Y) )
If available, this function computes the predictive variance analytically.
"""
pass
def _predictive_mean_numerical(self,mu,sigma):
"""
Laplace approximation to the predictive mean: E(Y_star) = E( E(Y_star|f_star) )
Laplace approximation to the predictive mean: E(Y_star|Y) = E( E(Y_star|f_star, Y) )
:param mu: cavity distribution mean
:param sigma: cavity distribution standard deviation