mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
pseudo EM algorithm for EP and maybe Laplace.
This commit is contained in:
parent
b33d3e4c99
commit
8dd33615c1
3 changed files with 41 additions and 23 deletions
|
|
@ -33,6 +33,15 @@ class EP(likelihood):
|
|||
self.Z = 0
|
||||
self.YYT = None
|
||||
|
||||
def restart(self):
|
||||
self.tau_tilde = np.zeros(self.N)
|
||||
self.v_tilde = np.zeros(self.N)
|
||||
self.Y = np.zeros((self.N,1))
|
||||
self.covariance_matrix = np.eye(self.N)
|
||||
self.precision = np.ones(self.N)[:,None]
|
||||
self.Z = 0
|
||||
self.YYT = None
|
||||
|
||||
def predictive_values(self,mu,var,full_cov):
|
||||
if full_cov:
|
||||
raise NotImplementedError, "Cannot make correlated predictions with an EP likelihood"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import numpy as np
|
||||
import copy
|
||||
|
||||
class likelihood:
|
||||
"""
|
||||
|
|
@ -37,4 +38,6 @@ class likelihood:
|
|||
def predictive_values(self, mu, var):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def copy(self):
|
||||
""" Returns a (deep) copy of the current likelihood """
|
||||
return copy.deepcopy(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue