mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-07 02:52:40 +02:00
fixed up product kernel tests
This commit is contained in:
parent
624117eaac
commit
02f2bb5c76
2 changed files with 13 additions and 2 deletions
|
|
@ -80,6 +80,7 @@ class Prod(CombinationKernel):
|
|||
if len(self.parts)==2:
|
||||
target += self.parts[0].gradients_X(dL_dK*self.parts[1].K(X, X2), X, X2)
|
||||
target += self.parts[1].gradients_X(dL_dK*self.parts[0].K(X, X2), X, X2)
|
||||
else:
|
||||
for combination in itertools.combinations(self.parts, len(self.parts) - 1):
|
||||
prod = reduce(np.multiply, [p.K(X, X2) for p in combination])
|
||||
to_update = list(set(self.parts) - set(combination))[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue