Closed datazhen closed 2 years ago
Hi, I derived a formula which is the gain in modularity when removing a node i from its community :
but it looks a little different followed in community_louvain.__one_level() module:
community_louvain.__one_level()
remove_cost = - resolution * neigh_communities.get(com_node,0) + \ (status.degrees.get(com_node, 0.) - status.gdegrees.get(node, 0.)) * degc_totw
should we change status.gdegrees.get(node, 0.) to status.gdegrees.get(node, 0.)/2?
status.gdegrees.get(node, 0.)
status.gdegrees.get(node, 0.)/2
I think that this /2 is already applied in degc_totw ?
Hi, I derived a formula which is the gain in modularity when removing a node i from its community :
but it looks a little different followed in
community_louvain.__one_level()
module:should we change
status.gdegrees.get(node, 0.)
tostatus.gdegrees.get(node, 0.)/2
?