align: Optimal Transport Alignment

View source: R/align.R

alignR Documentation

Optimal Transport Alignment

Description

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

Usage

align(data)

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.

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.

Examples

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))

OTclust documentation built on Oct. 6, 2023, 5:09 p.m.