FITC_network.py 文件源码

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

项目:deepGP_approxEP 作者: thangbui 项目源码 文件源码
def estimate_ls(self, X):
        Ntrain = X.shape[0]
        if Ntrain < 10000:
            X1 = np.copy(X)
        else:
            randind = np.random.permutation(Ntrain)
            X1 = X[randind[1:10000], :]

        d2 = compute_distance_matrix(X1)
        D = X1.shape[1]
        N = X1.shape[0]
        triu_ind = np.triu_indices(N)
        ls = np.zeros((D, ))
        for i in range(D):
            d2i = d2[:, :, i]
            d2imed = np.median(d2i[triu_ind])
            ls[i] = np.log(d2imed)
        return ls
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号