Learn R Programming

ConsensusClustering (version 1.5.0)

label_similarity: Similarity between different clusters

Description

Similarity between different clusters

Usage

label_similarity(x1, x2)

Value

matrix of similarities between clustering labels

Arguments

x1

clustering vector 1 Zero elements are are considered as unclustered samples

x2

clustering vector 2 Zero elements are are considered as unclustered samples

Details

When performing several clustering, the cluster labels may not match with each other. To find correspondences between clusters, the similarity between different labels will be calculated.

Examples

Run this code
X = gaussian_clusters()$X
x1 = kmeans(X, 5)$cluster
x2 = kmeans(X, 5)$cluster
Sim = label_similarity(x1, x2)

Run the code above in your browser using DataLab