refactored the kernpart base class

This commit is contained in:
James Hensman 2012-11-30 11:11:40 +00:00
parent 78d1abfc22
commit 411cd80cdc

View file

@ -9,11 +9,12 @@ class kernpart(object):
:param D: the number of input dimensions to the function :param D: the number of input dimensions to the function
:type D: int :type D: int
Do not instantiate.
""" """
self.D = D self.D = D
self.Nparam = 1. self.Nparam = 1
self.name = 'white' self.name = 'unnamed'
self.set_param(np.array([variance]).flatten())
def get_param(self): def get_param(self):
raise NotImplementedError raise NotImplementedError
@ -25,31 +26,31 @@ class kernpart(object):
raise NotImplementedError raise NotImplementedError
def Kdiag(self,X,target): def Kdiag(self,X,target):
raise NotImplementedError raise NotImplementedError
def dK_dtheta(self,X,X2,target): def dK_dtheta(self,partial,X,X2,target):
raise NotImplementedError raise NotImplementedError
def dKdiag_dtheta(self,X,target): def dKdiag_dtheta(self,partial,X,target):
raise NotImplementedError raise NotImplementedError
def psi0(self,Z,mu,S,target): def psi0(self,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi0_dtheta(self,Z,mu,S,target): def dpsi0_dtheta(self,partial,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi0_dmuS(self,Z,mu,S,target_mu,target_S): def dpsi0_dmuS(self,partial,Z,mu,S,target_mu,target_S):
raise NotImplementedError raise NotImplementedError
def psi1(self,Z,mu,S,target): def psi1(self,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi1_dtheta(self,Z,mu,S,target): def dpsi1_dtheta(self,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi1_dZ(self,Z,mu,S,target): def dpsi1_dZ(self,partial,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi1_dmuS(self,Z,mu,S,target_mu,target_S): def dpsi1_dmuS(self,partial,Z,mu,S,target_mu,target_S):
raise NotImplementedError raise NotImplementedError
def psi2(self,Z,mu,S,target): def psi2(self,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi2_dZ(self,Z,mu,S,target): def dpsi2_dZ(self,partial,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi2_dtheta(self,Z,mu,S,target): def dpsi2_dtheta(self,partial,Z,mu,S,target):
raise NotImplementedError raise NotImplementedError
def dpsi2_dmuS(self,Z,mu,S,target_mu,target_S): def dpsi2_dmuS(self,partial,Z,mu,S,target_mu,target_S):
raise NotImplementedError raise NotImplementedError
def dK_dX(self,X,X2,target): def dK_dX(self,X,X2,target):
raise NotImplementedError raise NotImplementedError