最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

networkx - Multi-layer modularity metric - Stack Overflow

programmeradmin2浏览0评论

I am stuck with computing the extended modularity metric on a multi-layer graph. I am trying to derive the result of the middle graph in Figure 6 of the following article:

Suppose we have the following multi-layer graph on two layers such that |V1| = |V2| = 1 and |E1| = |E2| = 23 (see picture of the graph in link). We also have 15 inter-layer links, connecting replica nodes across layers.

I am trying to compute the modularity of this multi-layer graph according to the following modularity formula (also given by this paper) extending Newmann's modularity (Ref. Newman Modularity)

The first term represents the sum of the layer-independent modularities (denormalized i.e, where the modularity of each layer $s$ is multiplied by $2|E_s|$). I have computed these modularities, both using a MATLAB software and networkx Python library and obtained 16.913043 for both layers (which makes sense given their similar topological structure).

Given that in our middle graph example, every node belongs to the same cluster in both layers, and for a uniform coupling strength of 1 (ie. W = 1 for all nodes and layers), this term is equal to 15.

By definition given in the paper, the scaling parameter mu = 2|E1| + 2|E2| + 15 = 2 * 23 + 2 * 23 + 15 = 107.

Plugging all these values yields a modularity of:

Q = 1/ (2 * 107) * [16.913043 + 16.913043 + 15]= 0.228160 that is clearly different to the value $Q_u = 0.52$ reported in the paper!

Could anyone please tell me if I have miscalculated anything or made wrong assumptions?

Thank you very much in advance!

发布评论

评论列表(0)

  1. 暂无评论