mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
predictive_values implemented in EP
This commit is contained in:
parent
4211cad89d
commit
2b40ee6f7e
4 changed files with 26 additions and 6 deletions
|
|
@ -29,6 +29,16 @@ class Gaussian:
|
|||
self._variance = x
|
||||
self.variance = np.eye(self.N)*self._variance
|
||||
|
||||
def predictive_values(self,mu,var):
|
||||
"""
|
||||
Un-normalise the prediction and add the likelihood variance, then return the 5%, 95% interval
|
||||
"""
|
||||
mean = mu*self._std + self._mean
|
||||
true_var = (var + self._variance)*self._std**2
|
||||
_5pc = mean + mean - 2.*np.sqrt(var)
|
||||
_95pc = mean + 2.*np.sqrt(var)
|
||||
return mean, _5pc, _95pc
|
||||
|
||||
def fit(self):
|
||||
"""
|
||||
No approximations needed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue