python-louvain
python-louvain copied to clipboard
Why there is factor 1 for all weights of edges in `induced_subgraph` (phase 2 of louvain)?
Citing from Fast unfolding of communities in large networks, Blondel et al., 2008:
The second phase of the algorithm consists in building a new network whose nodes are now the communities
found during the first phase.
To do so, the weights of the links between the new nodes are given by the sum of the weight of the links
between nodes in the corresponding two communities [21].
Links between nodes of the same community lead to self-loops for this community in the new network.
In the paper it's clear from Figure 1, that inner edges of the same community are counted with factor 1 for self-loops and factor 2 for other cases.
Why is there factor 1 for all weights of edges in induced_graph?
Here is a question at cs.stackexchange where I added math considerations on why actually using factor 1 is correct and wonder why authors used factor 2 for intra-edges.