Vertex marginal distributions for hierarchical SBM mode states

Hi Prof. Peixoto,

How do we get node marginals for hierarchical partitions?
The function PartitionModeState().get_marginal(g) only gives marginals for level 0.

Do we need to project all levels on the lowest level and then find the marginals for each level separately?

Many thanks,
Govinda

1 Like

Hello,

To get node marginals for hierarchical partitions; you need to project higher levels onto the lowest level and then calculate the marginals for each level separately. The PartitionModeState().get_marginal(g) function only returns marginals for level 0; so consider extending it / creating a new function to handle hierarchical projections.

You can check this [1405.5299] Annihilation of cohomology and decompositions of derived categories cpq this paper provides insights into hierarchical SBMs & discusses techniques for calculating node marginals.

Hope it helps ! :slightly_smiling_face:

Projecting is not a good idea, since the marginals are obtained over a different node set.

The problem is that in a set of hierarchical partitions the set of nodes at a given level is varying, and a node that is not present does not belong to any group. So, the proper definition of a marginal probability of a hierarchical partition would be: whenever a node (group) exists at a given level, with which probability does it belongs to a given group? This can be obtained easily by first obtaining the hierarchical consensus, and then aligning every partition in the set with it, and then computing the marginals as described.

This is not yet implemented in graph-tool. Please open a feature request issue in gitlab, and I will implement it in a future release.

The paper linked above has nothing to do whatsoever with SBMs or the calculation of node marginals. :man_shrugging: