Sotera / distributed-graph-analytics

Distributed Graph Analytics (DGA) is a compendium of graph analytics written for Bulk-Synchronous-Parallel (BSP) processing frameworks such as Giraph and GraphX. The analytics included are High Betweenness Set Extraction, Weakly Connected Components, Page Rank, Leaf Compression, and Louvain Modularity.
Apache License 2.0
174 stars 80 forks source link

louvain modularity in Graphx seems to have a problem #94

Open muzhi1991 opened 5 years ago

muzhi1991 commented 5 years ago

When compute deltaQ in q method ,deltaQ = k_i_in - (k_i * sigma_tot / M) seems not right. Here M is degree of Graph(2 edge, here may be total edge weight2). According the paper,we can use relative value of Q to choose neighbor ( that is k_i_in - sigma_tot*k_i/m ). so here M should be replaced by M/2(just m in paper) . is right or am I wrong?

https://github.com/Sotera/distributed-graph-analytics/blob/c22aaf4ba56a50276607939f8fad4df5469f29ca/dga-graphx/src/main/scala/com/soteradefense/dga/graphx/louvain/LouvainCore.scala#L263

tianfei0618 commented 5 years ago

It depends on which version of paper you've red.