bcca.py 文件源码

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

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

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

        num_rows, num_cols = data.shape
        biclusters = []

        for i, j in combinations(range(num_rows), 2):
            cols, corr = self._find_cols(data[i], data[j])

            if len(cols) >= self.min_cols and corr >= self.correlation_threshold:
                rows = [i, j]

                for k, r in enumerate(data):
                    if k != i and k != j and self._accept(data, rows, cols, r):
                        rows.append(k)

                b = Bicluster(rows, cols)

                if not self._exists(biclusters, b):
                    biclusters.append(b)

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


问题


面经


文章

微信
公众号

扫码关注公众号