matchContTable: Permute columns of a contingency table

Description Usage Arguments Value Examples

View source: R/general-functions.R

Description

Permute the columns of a contingency table comparing two clusterings to load the diagonal as much as possible.

Usage

1
matchContTable(table_1, table_2)

Arguments

table_1

Partition from a first data clustering

table_2

Partition from a second data clustering

Value

Permuted contingency table

Examples

1
2
3
4
## Generate arbitrary labels from two separate clustering results
labels_1 <- sample(1:10, 1000, replace=TRUE)  ## K=10 clusters
labels_2 <- sample(1:8, 1000, replace=TRUE)   ## K=8 clusters
matchContTable(labels_1, labels_2)

andreamrau/coseq documentation built on July 25, 2021, 10:17 a.m.