cdlib.algorithms.em¶
- cdlib.algorithms.em(g_original: object, k: int) NodeClustering¶
EM基于混合模型。 该算法使用期望最大化算法来检测网络中的结构。
支持的图表类型
无向
有向
加权
是的
是的
否
- Parameters:
g_original – 一个 networkx/igraph 对象
k – 期望的社区数量
- Returns:
节点聚类对象
- Example:
>>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> com = algorithms.em(G, k=3)
- References:
Newman, Mark EJ, 和 Elizabeth A. Leicht. 网络中的混合社区和探索性分析。 美国国家科学院院刊 104.23 (2007): 9564-9569.