serving.py 文件源码

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

项目:treecat 作者: posterior 项目源码 文件源码
def latent_correlation(self):
        """Compute correlation matrix among latent features.

        This computes the generalization of Pearson's correlation to discrete
        data. Let I(X;Y) be the mutual information. Then define correlation as

          rho(X,Y) = sqrt(1 - exp(-2 I(X;Y)))

        Returns:
            A [V, V]-shaped numpy array of feature-feature correlations.
        """
        result = self._ensemble[0].latent_correlation()
        for server in self._ensemble[1:]:
            result += server.latent_correlation()
        result /= len(self._ensemble)
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号