Merge flat disjoint clusterings whose pairwise ECS score is above a given threshold. The merging is done using a complete linkage approach.

merge_partitions(partition_list, ecs_thresh = 1, ncores = 1, order = TRUE)

Arguments

partition_list

A list of flat disjoint membership vectors.

ecs_thresh

A numeric: the ecs threshold.

ncores

The number of parallel R instances that will run the code. If the value is set to 1, the code will be run sequentially.

order

A logical: if TRUE, order the partitions based on their frequencies.

Value

a list of the merged partitions

Examples

initial_list = list(c(1,1,2), c(2,2,2), c('B','B','A'))
merge_partitions(initial_list, 0.99)
#> [[1]]
#> [[1]]$mb
#> [1] 1 1 2
#> 
#> [[1]]$freq
#> [1] 2
#> 
#> 
#> [[2]]
#> [[2]]$mb
#> [1] 2 2 2
#> 
#> [[2]]$freq
#> [1] 1
#> 
#>