align | R Documentation |
This function aligns an ensemble of partitions with a reference partition by optimal transport.
align(data)
data |
– a numeric matrix of horizontally stacked cluster labels. Each column contains cluster labels for all the data points according to one clustering result. The reference clustering result is put in the first column, and the first cluster must be labeled as 1. |
a list of alignment result.
distance |
Wasserstein distances between the reference partition and the others. |
numcls |
the number of clusters for each partition. |
statistics |
average tightness ratio, average coverage ratio, 1-average jaccard distance. |
cap |
cluster alignment and points based (CAP) separability. |
id |
switched labels. |
cps |
covering point set. |
match |
topological relationship statistics between the reference partition and the others. |
Weight |
weight matrix. |
data(sim1)
# the number of clusters.
C = 4
# calculate baseline method for comparison.
kcl = kmeans(sim1$X,C)
# align clustering results for convenience of comparison.
compar = align(cbind(sim1$z,kcl$cluster))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.