def getTestKernelDiag(self, params, Xtest):
self.checkParams(params)
if (len(Xtest) != len(self.kernels)): raise Exception('Xtest should be a list with length equal to #kernels!')
diag = 0
params_ind = 0
for k_i, k in enumerate(self.kernels):
numHyp = k.getNumParams()
diag += k.getTestKernelDiag(params[params_ind:params_ind+numHyp], Xtest[k_i])
params_ind += numHyp
return diag
#the only parameter here is the bias term c...
评论列表
文章目录