kernels.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:MKLMM 作者: omerwe 项目源码 文件源码
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...
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号