xmotifs.py 文件源码

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

项目:biclustlib 作者: padilha 项目源码 文件源码
def run(self, data):
        """Compute biclustering.

        Parameters
        ----------
        data : numpy.ndarray
        """
        data = check_array(data, dtype=np.int, copy=True)
        self._validate_parameters()

        num_remaining_rows, num_cols = data.shape
        remaining_rows = np.ones(num_remaining_rows, np.bool)
        biclusters = []

        for i in range(self.num_biclusters):
            indices = np.where(remaining_rows)[0]
            b = self._find_motif(data, indices)
            biclusters.append(b)

            remaining_rows[b.rows] = False
            num_remaining_rows -= len(b.rows)

            if num_remaining_rows == 0:
                break

        return Biclustering(biclusters)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号