Display, for all configurations consisting in different number of neighbors, graph types and base embeddings, the EC Consistency of the partitions obtained over multiple runs on an UMAP embedding.

plot_n_neigh_ecs(nn_ecs_object, boxplot_width = 0.5)

Arguments

nn_ecs_object

An object or a concatenation of objects returned by the `get_nn_importance` method.

boxplot_width

Used for adjusting the width of the boxplots; the value will be passed to the `width` argument of the `ggplot2::geom_boxplot` method.

Value

A ggplot2 object.

Examples

set.seed(2021)
# create an artificial expression matrix
expr_matrix = matrix(c(runif(100*10), runif(100*10, min=5, max=6)), nrow = 200)
rownames(expr_matrix) = as.character(1:200)

nn_importance_obj = get_nn_importance(object = expr_matrix,
    n_neigh_sequence = c(10,15,20),
    n_repetitions = 10,
    graph_reduction_type = "PCA",
    algorithm = 1,
    transpose = FALSE, # the matrix is already observations x features, so we won't transpose it
    # the following parameter is used by the irlba function and is not mandatory
    nv = 2)
plot_n_neigh_ecs(nn_importance_obj)