Closed ma-ji closed 3 years ago
how modularity value is calculated for unweighted graph?
how modularity value is calculated for unweighted graph?
Just set all weights to 1?
Hello, for unweighted graphs, all weights are assumed to be 1. In fact if you specify a weight key which does not exist, all weights are assumed to be 1. Even if one specific link have no weight set it will be 1.
Thanks for your reply
On Sun, 27 Dec, 2020, 9:20 PM Thomas Aynaud, notifications@github.com wrote:
Hello, for unweighted graphs, all weights are assumed to be 1. In fact if you specify a weight key which does not exist, all weights are assumed to be 1. Even if one specific link have no weight set it will be 1.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/taynaud/python-louvain/issues/73#issuecomment-751483227, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANB2WCONH6MVBBTDECG4ICLSW5JTVANCNFSM4T4I3YVQ .
I need the algorithm to take the graph as unweighted, but the
weight
parameter cannot be set toNone
, only string is accepted. I'm currently set as"None"
and it works. But probably improvements can be made in the source codes?