I was going to put this in a comment, but in this format it was too long and hard to read, so this is a tangential answer.
One thing you should do is evaluate if the community structure search algorithm works well. You can try to visualize your network to set:
- Is an algorithm that returns community structures meaningful? Maybe there is one mass community?
- If not, then visualization gives an idea of โโwhy?
This will help you tell you the next steps. Maybe the network structure requires a different algorithm?
One thing that I find useful for large networks is to draw your edges as a heat map. This is easy to do if you have edges stored in the adjacency matrix.
To do this, you can use the image function by passing the argument z to your edge matrix. Hope this allows you to see the prominent community structure.
However, you also want to evaluate the correctness of your algorithm, so you want to sort the nodes (rows and columns of the adjacency matrix) by the community to which they were assigned.
Another thing to note is that if your ribs are pointed, it can be harder to evaluate with your eyes, since the edges may appear on either side of the diagonal of the heat map. One thing you can do is construct the underlying graph - this is an adjacency matrix, assuming your edges are not oriented.
If your algorithm does a good job, you expect to see square blocks diagonally, one for each discovered community.
Scott ritchie
source share