cdlib.algorithms.node_perception¶
- cdlib.algorithms.node_perception(g_original: object, threshold: float, overlap_threshold: float, min_comm_size: int = 3) NodeClustering¶
节点感知基于将小节点集连接在一起的想法。 该算法首先识别与每个节点对周围网络的感知相对应的子社区。 为了执行此步骤,它分别考虑每个节点,并使用一些现有的社区检测方法将该节点的邻居划分为社区。 接下来,它创建一个新的网络,其中每个节点对应一个子社区,如果它们关联的子社区重叠至少达到某个阈值,则两个节点相连。 最后,该算法在这个新网络中识别重叠的社区,并为每个这样的社区合并关联的子社区,以识别原始网络中的社区。
支持的图表类型
无向
有向
加权
是的
否
否
- Parameters:
g_original – 一个 networkx/igraph 对象
threshold – 合并社区所需的容忍度
overlap_threshold – 重叠容忍度
min_comm_size – 最小社区大小 默认值为3
- Returns:
节点聚类对象
- Example:
>>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> coms = algorithms.node_perception(G, threshold=0.25, overlap_threshold=0.25)
- References:
Sucheta Soundarajan 和 John E. Hopcroft. 2015. 使用本地组信息识别网络中的社区。 ACM Trans. Knowl. Discov. Data 9, 3, 文章 21 (2015年4月), 27页. DOI=http://dx.doi.org/10.1145/2700404