mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-11 21:12:38 +02:00
sparse GP regression now working on this branch
This commit is contained in:
parent
5ba2099ee9
commit
ba84a43ea3
5 changed files with 34 additions and 26 deletions
|
|
@ -48,6 +48,9 @@ class linear(kernpart):
|
|||
def dK_dX(self,partial,X,X2,target):
|
||||
target += self.variance * np.sum(partial[:,None,:]*X2.T[None,:,:],-1)
|
||||
|
||||
def dKdiag_dtheta(self,partial,X,target):
|
||||
target += np.sum(partial*np.square(X).sum(1))
|
||||
|
||||
# def psi0(self,Z,mu,S,target):
|
||||
# expected = np.square(mu) + S
|
||||
# np.add(target,np.sum(self.variance*expected),target)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class rbf(kernpart):
|
|||
self._K_computations(X,X2)
|
||||
_K_dist = X[:,None,:]-X2[None,:,:]
|
||||
dK_dX = np.transpose(-self.variance*self._K_dvar[:,:,np.newaxis]*_K_dist/self.lengthscale2,(1,0,2))
|
||||
target += np.sum(dK_dX*partial[:,:,None],0)
|
||||
target += np.sum(dK_dX*partial.T[:,:,None],0)
|
||||
|
||||
def dKdiag_dX(self,X,target):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ class white(kernpart):
|
|||
if np.all(X==X2):
|
||||
target += np.trace(partial)
|
||||
|
||||
def dKdiag_dtheta(self,X,target):
|
||||
np.add(target[:,0],1.,target[:,0])
|
||||
def dKdiag_dtheta(self,partial,X,target):
|
||||
target += np.sum(partial)
|
||||
|
||||
def dK_dX(self,partial,X,X2,target):
|
||||
pass
|
||||
|
||||
def dKdiag_dX(self,X,target):
|
||||
def dKdiag_dX(self,partial,X,target):
|
||||
pass
|
||||
|
||||
def psi0(self,Z,mu,S,target):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue