# Consensus clustering: how to choose the final cluster based on the consensus matrix?

I've been reading about consensus clustering and the consensus matrix in this article. I understand how the consensus matrix is made after re-sampling and clustering parts of your data H times. I understand that the consensus matrix is used to determine the optimal amount of clusters (k) and allows for making a nice heatmap. What I don't understand is how this consensus matrix results in your final clustering.

Say I have a consensus matrix of 4*4 (so we have 4 items to be clustered) where each value between 0 and 1 in the matrix represents the number of times items i and j are assigned to the same cluster, divided by the total numer of times both items are selected for clustering. We could have the following consensus matrix after 4 iterations of 80% sub-samples (taken from here). We kept track of all 4 clusters that were made in the process of obtaining this consensus matrix. How do we select the final clustering based on this consensus matrix?

• What is the "consensus index value" on that distribution plot in the original post?
– WBM
Feb 26, 2021 at 10:34
• @WBM that's the values we see in the image above. In the most ideal scenario we'd have only 0's and 1's which indicates perfect consensus. Feb 26, 2021 at 10:36
• So isn't this then an additional evaluation technique (i.e. how much consensus is there between clusters), rather than explicit clustering? The clusters would drop out earlier in the processing. It looks like you use the consensus metric to test for the best K value
– WBM
Feb 26, 2021 at 10:43
• @WBM Yes, maybe you're right and it's not meant for deciding on the final clustering. It would then only give more certainty on the value of k and the stability of the discovered clusters. And then after you gained more insight, you can cluster again using a regular clustering technique with the found value of k? Feb 26, 2021 at 10:48
• I believe so, much like the Silhouette score
– WBM
Feb 26, 2021 at 10:49