6823a1df2eb3ee12173d2e84c6e21870f1d6fd31,GPy/kern/_src/prod.py,Prod,gradients_X,#Prod#Any#Any#Any#,49
Before Change
def gradients_X(self, dL_dK, X, X2=None):
target = np.zeros(X.shape)
for k1,k2 in itertools.combinations(self.parts, 2):
target += k1.gradients_X(dL_dK*k2.K(X, X2), X, X2)
target += k2.gradients_X(dL_dK*k1.K(X, X2), X, X2)
return target
def gradients_X_diag(self, dL_dKdiag, X):
target = np.zeros(X.shape)
After Change
def gradients_X(self, dL_dK, X, X2=None):
target = np.zeros(X.shape)
k = self.K(X,X2)*dL_dK
for p in self.parts:
target += p.gradients_X(k/p.K(X,X2),X,X2)
return target
def gradients_X_diag(self, dL_dKdiag, X):
target = np.zeros(X.shape)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: SheffieldML/GPy
Commit Name: 6823a1df2eb3ee12173d2e84c6e21870f1d6fd31
Time: 2014-09-24
Author: z.dai@sheffield.ac.uk
File Name: GPy/kern/_src/prod.py
Class Name: Prod
Method Name: gradients_X
Project Name: SheffieldML/GPy
Commit Name: 6823a1df2eb3ee12173d2e84c6e21870f1d6fd31
Time: 2014-09-24
Author: z.dai@sheffield.ac.uk
File Name: GPy/kern/_src/prod.py
Class Name: Prod
Method Name: gradients_X_diag
Project Name: SheffieldML/GPy
Commit Name: 6823a1df2eb3ee12173d2e84c6e21870f1d6fd31
Time: 2014-09-24
Author: z.dai@sheffield.ac.uk
File Name: GPy/kern/_src/prod.py
Class Name: Prod
Method Name: update_gradients_diag
Project Name: SheffieldML/GPy
Commit Name: 6823a1df2eb3ee12173d2e84c6e21870f1d6fd31
Time: 2014-09-24
Author: z.dai@sheffield.ac.uk
File Name: GPy/kern/_src/prod.py
Class Name: Prod
Method Name: update_gradients_full