I've been using graph tool for about 3 weeks now. I just ran into it while
searching for a modularity method for a bipartite network.
I am amazed by graph tool and the algorithms within. But I am having truble
with a basic question (at least I think it is).
I am reading a bipartite network from a graphml file, then I do some
filtering and finally I construct the minimize_nested_blockmodel_dl as in
the example. Then I draw it, just like in the example, and it looks great.
I manage to draw it with the node names and they are fine.
Then, I would like to check the names of the nodes in the different blocks,
by the levels they are arranged from the stochastic nested block model. But
I do not know how to do that.
I found the function get_bstack() for the NestedBlockState object, but the
index in those vertices are from 0 to N, where N is the number of vertices
per level (of the model, not from my graph, I think), then how do I
associate my original vertex index (which has its name) to those graphs
from the different levels?
In short, I want to write down (terminal or file) the vertices from the
graph (with its node names) for each level and respective block. I suppose
it can be done, because the info is in the draw, but I do not know how.
Thanks in advance! Great job with graph tool, and the stochastic block
model (which I haven't completely understood, but I will).
I work with graph-tool 2.16-1 under Arch Linux, with Python 3.5, if that
The bipartite network have 2230 vertices and 246764 edges .
From the state summary:
l: 0, N: 2230, B: 174
l: 1, N: 174, B: 68
l: 2, N: 68, B: 26
l: 3, N: 26, B: 9
l: 4, N: 9, B: 3
l: 5, N: 3, B: 1
Have a great day!
attachment.html (6.77 KB)