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:
- Build consensus matrix using
fit()
- Convert to distance matrix:
distance_matrix = 1 - self.Mk
- 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
Report
When reviewing the ConsensusCluster implementation (
src/flowsom/models/consensus_cluster.py,v0.2.2), it seems thatfit_predict()ignores thefit()function that does the consensus clustering and just runs AgglomerativeClustering once on raw data (lines 105-109):Based on the consensus clustering paper and the R FlowSOM implementation, it seems that fit_predict() should:
fit()distance_matrix = 1 - self.MkAgglomerativeClustering(n_clusters=k, metric='precomputed').fit_predict(distance_matrix)Versions