cdlib.algorithms.infomap_bipartite

cdlib.algorithms.infomap_bipartite(g_original: object, flags: str = '') BiNodeClustering

Infomap 基于信息论的思想。 该算法使用二分网络上随机游走的概率流作为真实系统中信息流的代理,并通过压缩概率流的描述来将网络分解为模块。

支持的图表类型

无向

有向

加权

二分图

是的

是的

是的

是的

Parameters:
  • g_original – 一个 networkx/igraph 对象

  • flags – Infomap的字符串标志

Returns:

BiNodeClustering 对象

Example:

>>> from cdlib import algorithms
>>> import networkx as nx
>>> G = nx.algorithms.bipartite.generators.random_graph(100, 20, 0.5)
>>> coms = algorithms.infomap_bipartite(G)
References:

Rosvall M, Bergstrom CT (2008) 复杂网络上随机游走的地图揭示了社区结构。 美国国家科学院院刊 105(4):1118–1123

注意

参考实现:https://pypi.org/project/infomap/

注意

Infomap Python API 文档: https://mapequation.github.io/infomap/python/