Performs hierarchical clustering on a stack of consensus matrices to obtain consensus class labels.

CSPA(E, k)

## Arguments

E

is an array of clustering results.

k

number of clusters

## Value

cluster assignments for the consensus class

Other consensus functions: LCA(), LCE(), k_modes(), majority_voting()

Derek Chiu

## Examples

data(hgsc)
dat <- hgsc[1:100, 1:50]
x <- consensus_cluster(dat, nk = 4, reps = 4, algorithms = c("hc", "diana"),
progress = FALSE)
CSPA(x, k = 4)
#>   [1] 1 1 2 2 2 1 1 2 2 1 2 2 1 1 3 2 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 2
#>  [38] 2 3 2 1 2 2 2 2 2 2 2 1 1 2 2 1 1 1 2 2 1 2 1 1 1 2 1 1 4 1 2 2 1 2 1 1 2
#>  [75] 1 2 1 1 3 1 2 1 2 2 1 2 1 1 3 2 2 2 1 2 2 1 1 2 1 1