Am 09.07.21 um 12:47 schrieb arttu.malkamaki@helsinki.fi:
Q1) This is taking very long (days) on a high performance cluster and actually I haven't seen it finishing up for once. Is my model specification correct or simply too complex? If the latter, is there a better strategy to perform my analysis? All I can think of is to revert to a non-nested model and/or reduce the number of layers and/or edges:
Very hard to say something, without more concrete information. How large is your network?
You are using the most complex combination possible, so indeed it should take longer than the simpler variants.
My overall suggestion is to always try the minimize_nested_blockmodel_dl() function first, and (time permitting) use that as a starting point to the MCMC.
Furthermore, I would suggest starting simple, using non-overlapping, unweighted and non-layered models first, and seeing how far you get, and building understanding from your data that way. You can then introduce more elaborate models step by step.
Q2) Say that the model runs and yields a neat NestedBlockState (or LayeredBlockState) object with X overlapping blocks, 9 layers, degree-corrected, with 2 edge covariates, for graph <Graph object, undirected, with 220 vertices and 11322 edges, 2 internal vertex properties, 4 internal edge properties>.
Now, in previous posts there are mentions about the number of nodes multiplying by the number of layers when 'overlap=True', but in my experiments with only two layers, this does not seem to be the case and I struggle to find a way to extract the layer-specific block and respective memberships of nodes.
I've tried iteration over vertices, but what I eventually need is a 2d_array [y=all nodes in g, x=all layers in g, values=most likely block membership] in order to map how/if the block membership of each node varies across those layers in which they participate (ideally somehow denoting non-participation in the layer with NaN or some unique value). Is there some way to get there?
In the overlapping model, group membership is a property of _edges_ (actually, half-edges), not nodes directly. Take a look at OverlapBlockState.get_edge_blocks(), which will give you this information. From this, you should be able to decompose membership across layers, etc.
Best, Tiago