Skip to contents

Following clustering with batch_snf, a matrix of pairwise ARIs that show how related each cluster solution is to each other can be generated by the calc_aris function. Partitioning of the ARI matrix can be done by visual inspection of adjusted_rand_index_heatmap() or by shiny_annotator. Given the indices of meta cluster boundaries, this function will return a single representative solution from each meta cluster based on maximum average ARI to all other solutions within that meta cluster.

Usage

get_representative_solutions(
  aris,
  split_vector,
  order,
  solutions_matrix,
  filter_fn = NULL
)

Arguments

aris

Matrix of adjusted rand indices from calc_aris()

split_vector

A vector of partition indices.

order

Numeric vector indicating row ordering of settings matrix.

solutions_matrix

Output of batch_snf containing cluster solutions.

filter_fn

Optional function to filter the meta-cluster by prior to maximum average ARI determination. This can be useful if you are explicitly trying to select a solution that meets a certain condition, such as only picking from the 4 cluster solutions within a meta cluster. An example valid function could be fn <- function(x) x[x$"nclust" == 4, ].