mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
gp merge, grad dict is property of self + Y_metadata being passed through
This commit is contained in:
commit
6530af3e46
14 changed files with 204 additions and 59 deletions
|
|
@ -34,8 +34,8 @@ class Coregionalize(Kern):
|
|||
|
||||
.. note: see coregionalization examples in GPy.examples.regression for some usage.
|
||||
"""
|
||||
def __init__(self, output_dim, rank=1, W=None, kappa=None, name='coregion'):
|
||||
super(Coregionalize, self).__init__(input_dim=1, name=name)
|
||||
def __init__(self, input_dim, output_dim, rank=1, W=None, kappa=None, name='coregion'):
|
||||
super(Coregionalize, self).__init__(input_dim, name=name)
|
||||
self.output_dim = output_dim
|
||||
self.rank = rank
|
||||
if self.rank>output_dim:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class Prod(CombinationKernel):
|
|||
def update_gradients_full(self, dL_dK, X):
|
||||
for k1,k2 in itertools.combinations(self.parts, 2):
|
||||
k1._sliced_X = k1._sliced_X2 = k2._sliced_X = k2._sliced_X2 = True
|
||||
k1.update_gradients_full(dL_dK*k2.K(X, X)
|
||||
k1.update_gradients_full(dL_dK*k2.K(X, X))
|
||||
self.k2.update_gradients_full(dL_dK*self.k1.K(X[:,self.slice1]), X[:,self.slice2])
|
||||
|
||||
def gradients_X(self, dL_dK, X, X2=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue