[graph-tool] How to effectively get the nested blockmodel block memberships of each of the nodes in your graph

2017-08-05 Thread lenail
Hello Graph Tool developers, I'm interested in the nested stochastic block model (nsbm). What interests me most is: when I fit the model, where did each of my nodes get clustered? The closest function I can find to this in the API by reading the docs is: nsbm.get_bs() which returns [Property

Re: [graph-tool] How to effectively get the nested blockmodel block memberships of each of the nodes in your graph

2017-08-05 Thread Alexandre Hannud Abdo
Ni! What you're looking for is the 'project_level' method of NestedBlockState: some_level = 2 blocks = state.project_level( some_level ).get_blocks() block_for_v_at_level = blocks[ some_vertex ] Hope this helps, ale .~ยด On Sat, Aug 5, 2017 at 5:29 PM, lenail wrote: > Hello Graph Tool devel

Re: [graph-tool] How to effectively get the nested blockmodel block memberships of each of the nodes in your graph

2017-08-05 Thread Alex Lenail
Thank you! I'll try that out. On Sat, Aug 5, 2017 at 11:51 AM, Alexandre Hannud Abdo wrote: > Ni! > > What you're looking for is the 'project_level' method of NestedBlockState: > > some_level = 2 > blocks = state.project_level( some_level ).get_blocks() > block_for_v_at_level = blocks[ some_vert