我正在寻找一种针对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))