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 摘要。