Node memberships issue


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 =["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

# 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.

The overlapping SBM will only put nodes in mixed groups if this minimizes the description length, i.e. if there’s enough evidence in the data to justify this, otherwise it will yield non-overlapping partitions (which are a special case).

Thank you very much for your answer. Would you know a graph in which the method returns overlapping groups? I can’t find any.