On 19.03.2015 20:56, yinjunjun wrote:
Hi,
I am trying to use graph tool to extract communities, and I used the minimize_blockmodel_dl function. However, after it has been executed successfully, I wish to know each vertex and information of which community it belongs to, and I can not figure out how. For example, state = graph_tool.community.minimize_blockmodel_dl(g, parallel=True) ##print state.b print state.get_blocks().get_array()
it give me an array of all the vertex in zero. Could any one point me to the right directions. Thank you very much.
What you tried to do is correct. If the values of state.b are all zero, it means that the best fit is a block model with only one group, i.e. your graph looks like a random graph.
If you want to force a minimum number of groups (and risk overfitting), you can specify the "min_B" option.
Best, Tiago