Am 26.02.21 um 20:00 schrieb ulgenklc:
I have a serious problem with getting the node labels. The code below only
returns the node membership information for N nodes(size of the aggregated
network). But since this is an evolving network, nodes are expected to
change communities over time, so below code should return NxT(number of
nodes times number of layers) many community labels?

levels = state.get_levels()
for s in levels:
     print(s)

This returns the network partition at different levels of the nested SBM but
only for N many nodes.

What am I missing?

You are missing the fact that the layered model only has a single partition shared between all the layers.

If you want a model that gives a different partition for every layer you can either:

1. Split each layer into a separate graph, and fit a different SBM for each layer.

2. Fit an overlapping SBM (i.e. by passing overlap=True to LayeredBLockState), which will cluster the "half-edges", and hence give partitions that (potentially) vary between the layers.

Best,
Tiago

--
Tiago de Paula Peixoto <[email protected]>
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to