Hello,
I am trying to detect overlapping communities with the following code that I got from this page of the documentation
import graph_tool.all as gt
g = gt.collection.data["polbooks"]
state = gt.minimize_blockmodel_dl(g, state=gt.OverlapBlockState)
# Extract overlapping communities
bv, _, _, _ = state.get_overlap_blocks()
# Print the vertex property map containing the block memberships of each node
print(list(bv))
# To easily see if there exists a node that belongs to more than one block, the following
# line should not print "1".
print(f"(unique) number of blocks per node {set([len(i) for i in list(bv)])}")
In this code, I am detecting overlapping blocks, with the example given in the documentation, then I try to identify the nodes that belong to several blocks by printing the block memberships of each node. I tried multiple times, with each graph that has less than 1000 nodes in graph_tool.collection.
Assuming my code is correct, I never got any node belonging to multiple blocks. Is there no node belonging to multiple blocks in any graph with n<1000 from the collection? Or am I doing something wrong?
Even in the documentation, I see only two colours in the overlapping plots. Which nodes are overlapping?
Thanks a lot.