View source: R/basic_functions.R
cluster_relabel | 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.