Learn R Programming

OTclust (version 1.0.6)

align: Optimal Transport Alignment

Description

This function aligns an ensemble of partitions with a reference partition by optimal transport.

Usage

align(data)

Value

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.

Arguments

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.

Examples

Run this code
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))

Run the code above in your browser using DataLab