python-igraph实现中community_edge_betweenness()的算法

Algorithm of community_edge_betweenness() in python-igraph implementation

由于community_fastgreedy()无法处理有向图(有向未加权图),我不得不从使用community_fastgreedy()转向community_edge_betweenness()

我的理解是 community_fastgreedy() 是自下而上的方法,而 community_edge_betweenness() 是自上而下的方法,两者都基于寻找最大化模块化的社区的原则,一个通过合并社区,另一个通过去除边缘。

在M.Girvan和M.E.J.Newman "Community structure in social and biological networks",的原始论文中没有提到它能够处理有向图。这用于 community_edge_betweenness()

我参考了 here and Link 文档以获取有关定向网络算法的更多信息。

我的问题是 -

  1. 是我的理解,community_fastgreedy()community_edge_betweenness() 在 python-igraph 中的实现依赖于最大化模块化,正确。

  2. 你能指点我如何实现 community_edge_betweenness 来处理 python-igraph 中的定向网络的文档或 Girvan 和纽曼.

由于我是社区检测的新手,所以任何指示都是有用的。 我知道有更好的方法(Louvain、Infomap),但仍需要使用 CNM 或 GN 进行比较。

谢谢。

  1. community_edge_betweenness() 不会尝试最大化模块化。如果用户坚持 "flat" 社区结构而不是扁平树状图,模块化仅用作决定 "cut" 算法生成的树状图的位置的经验法则。

  2. community_edge_betweenness() "handles" 有向图在计算边的边介数分数(然后依次用于决定在特定步骤中删除哪条边)。据我所知,目前还没有人研究过这种方法是否科学合理和正确。

大多数社区检测方法(尤其是最大化模块化的方法)不适合有向图的原因是因为 "community" 的概念对于有向图没有明确定义 - 大多数算法在图中寻找 "denser than expected by chance" 的部分,但这个模糊的定义并没有说明应该如何使用边的方向。此外,有向图的模块化分数有多个(冲突的)扩展。

据我所知,igraph 中唯一 "formal" 处理有向网络中社区问题的方法是 InfoMap algorithm. InfoMap defines communities based on minimal encodings of random walks within graphs so it is able to take the edge directions into account accurately - roughly speaking, communities found by the InfoMap algorithm are groups of nodes for which a random walker has a small probability of "escaping" from the group. (The InfoMap homepage has a nice visual explanation)。所以,如果你真的需要在有向图中找到社区,我会建议使用 InfoMap 方法。