plaid.py 文件源码

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

项目:biclustlib 作者: padilha 项目源码 文件源码
def _kmeans_initialization(self, residuals):
        """Computes k-means with k = 2 to find the initial components (rows or columns) of a new layer/bicluster."""
        _, labels, _ = k_means(residuals, n_clusters=2, n_init=self.initialization_iterations, init='random', n_jobs=1)
        count0, count1 = np.bincount(labels)

        if count0 <= count1:
            return np.where(labels == 0)[0]

        return np.where(labels == 1)[0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号