You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checking with the original code of community_louvain I've found a bug in the 'negative_asym' treatment of negative weights.
The original code of community_louvain reads:
W1 = -W * (W < 0)
when one is building the matrix of negative weights, while in the bctpy version the minus is forgotten:
W1 = W * (W < 0)
I suggest to fix this issue that results in wrong computation of the modularity.
The text was updated successfully, but these errors were encountered:
Finally I would like to point out that the output modularity is normalized twice when using either the 'negative_sym' or 'negative_asym' options. The output value of modularity q must be remultiplied back by the value of s.
Checking with the original code of community_louvain I've found a bug in the 'negative_asym' treatment of negative weights.
The original code of community_louvain reads:
W1 = -W * (W < 0)
when one is building the matrix of negative weights, while in the bctpy version the minus is forgotten:
W1 = W * (W < 0)
I suggest to fix this issue that results in wrong computation of the modularity.
The text was updated successfully, but these errors were encountered: