cluster_relabel {ConsensusClustering} | R Documentation |
Relabeling clusters based on cluster similarities
cluster_relabel(x1, x2)
x1 |
clustering vector 1 Zero elements are are considered as unclustered samples |
x2 |
clustering vector 2 Zero elements are are considered as unclustered samples |
When performing performing several clustering, the cluster labels may no match with each other. To perform maximum voting, the clustering need to be relabels based on label similarities.
dataframe of relabeled clusters
X = gaussian_clusters()$X
x1 = kmeans(X, 5)$cluster
x2 = kmeans(X, 5)$cluster
clusters = cluster_relabel(x1, x2)