ConsensusCluster doesn't seem to use consensus matrix for clustering

未关闭
#25 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

  • #29 来自 @sharifhsn —— 已关闭,未合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

The problem is in fit_predict() in src/flowsom/models/consensus_cluster.py (around lines 105-109), which clusters the raw data and never uses the consensus matrix built by fit(). Read fit() to see how self.Mk is produced, then check how the ConsensusCluster class builds its precomputed-distance clustering. Done means fit_predict() clusters on the consensus-derived distances (or exposes that as an option) and the output differs from the raw-data path on a small test dataset.

由索引模型根据 Issue 内容生成。

描述

bug
Report

When reviewing the ConsensusCluster implementation (src/flowsom/models/consensus_cluster.py, v0.2.2), it seems that fit_predict() ignores the fit() function that does the consensus clustering and just runs AgglomerativeClustering once on raw data (lines 105-109):

    if self.z_score:
        data = self._z_score(data)
    return self.cluster(n_clusters=self.n_clusters, linkage=self.linkage).fit_predict(data)

Based on the consensus clustering paper and the R FlowSOM implementation, it seems that fit_predict() should:

  1. Build consensus matrix using fit()
  2. Convert to distance matrix: distance_matrix = 1 - self.Mk
  3. Cluster using consensus distances (or at least have an option to cluster on the matrix or data, as in the ConsensusCluster class: AgglomerativeClustering(n_clusters=k, metric='precomputed').fit_predict(distance_matrix)
Versions
v0.2.2
主要语言
Python
星标
36
派生
7
平均合并
23 分钟
30 天内合并 PR
3

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

saeyslab/FlowSOM_Python 的其他 Issue

查看 saeyslab/FlowSOM_Python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。