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
I'm sorry for my mistake. sum(k_i) is the 2m in the expression. But there's another problem
I've tried many modularity calculation functions and their answer is different from yours, which made me believe that your function has some problem.
Eventually, I found it, not in the "modularity_matrix" function, but here:
The problem is the diagonal elements of "C" here is still 0, and your input array is modularity_matrix, not adj_matrix.
So you discarded part of your data here.
And also, you can't use np.tril here.
Here is the modularity I know.
And here is your code:
I think you want "K" as 1/2m * kikj,and "norm" is the 1/2m,but where is the
1/2
?The text was updated successfully, but these errors were encountered: