matchContTable {coseq}R Documentation

Permute columns of a contingency table

Description

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

Usage

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

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


[Package coseq version 1.17.2 Index]