The Issue
I am trying to specify the number of clusters and the number of members in each cluster that the CommunityGraphPlot function forms as part of a larger project.
The Code
This code generates a complete graph with a random edge weight between 0 and 1 assigned between each node. It then outputs a community graph plot, choosing communities based on some algorithm.
n = 10;
q = n * (n - 1)/2;
g = CompleteGraph[n, EdgeWeight -> RandomReal[{0, 1}, {q}]];
FindGraphCommunities[g];
CommunityGraphPlot[g,
Method -> "Hierarchical",(*EdgeLabels\[Rule]"EdgeWeight",*)
ImageSize -> Full]
The Question
This function is something of a black box, and while reviewing the documentation, I was unable to find any options to specify how many clusters it forms, or how many members are in each cluster. Are there workarounds to this issue?
Also I would appreciate if anyone could point me towards any literature on the methods used to choose clusters, or any other functions that could be used to specify the number of clusters, etc.
Thank you.