Skip to content

Commit

Permalink
⬆️ modularity density check
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRossetti committed Feb 23, 2021
1 parent 7731726 commit 42654a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cdlib/evaluation/fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def modularity_density(graph, communities, **kwargs):
dext.append(graph.degree(node) - c.degree(node))

try:
q += (1 / nc) * (np.mean(dint) - np.mean(dext))
q += (1 / nc) * (np.sum(dint) - np.sum(dext))
except ZeroDivisionError:
pass

Expand Down

0 comments on commit 42654a3

Please sign in to comment.