Leiden algorithm is an improved version of the Louvain algorithm that should prevent badly connected or even disconnected clusters.
It can be parametrized with different resolutions that determine how large communities are detected in the SNN graph. Generally, lower resolutions result in coarse-grained clusters, while higher ones in more fine-grained structures.
The relationships in cluster abundances under different resolutions are visualized in the clustree
plot below.
Stable clusters across different resolutions can be quickly find as straight or little branched vertical lines.
r scdrake::create_a_link(cluster_graph_leiden_clustree_file, "**PDF with clustree**", href_rel_start = fs::path_dir(report_html_file))
r scdrake::format_used_functions(c("igraph::cluster_leiden()", "clustree::clustree()"))
res <- scdrake::generate_dimred_plots_clustering_section( dimred_plots_clustering_files, dimred_plots_clustering_united_files, "graph", "leiden", fs::path_dir(report_html_file), 4 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.