python中有向加权图中的群体检测

2024-05-29 07:14:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在寻找python中有向加权图的社区检测方法。到目前为止,我尝试使用这两种方法,但它们只适用于无向、未加权图

# 1 
c= list(greedy_modularity_communities(usg))
c

# 2
communities_generator = community.girvan_newman(usg)
top_level_communities = next(communities_generator)
next_level_communities = next(communities_generator)
sorted(map(sorted, next_level_communities))

Tags: 方法communitytopgeneratorlevel社区listnext

热门问题