networkx - networkx calculate a a good partition and modularity of it
问题描述
I am looking for a method in networkx that does the same as this one, except that it does consider edge weights: https://networkx.github.io/documentation/latest/reference/algorithms/generated/networkx.algorithms.community.modularity_max.greedy_modularity_communities.html
greedy_modularity_communities:
Find communities in graph using Clauset-Newman-Moore greedy modularity maximization. This method currently supports the Graph class and does not consider edge weights.
Does it exist? I can't find it. Thanks for reading.
解决方案
Does it have to be Networkx? The iGraph package offers significantly more functionality for community detection, including an implementation of weighted fastgreedy. You can save your graph file in Networkx as .gml, which would make it easily transferable to iGraph.
If you go to this page, you'll see a full list of the detection algorithms this package offers, each starting with the tag 'community_'. The page will also provide tutorials on how to implement these algorithms.
I don't think Networkx offers this functioning directly, however there is an add-on package called python-louvain which might provide what you're looking for.
推荐阅读
- typescript - jhipster:在角度客户端上不支持过滤实体的 jhipster 生成?
- django - 将带有 SQL 数据库的 Django 应用程序部署到 Azure
- javascript - 如何完成generateHash函数?
- c# - 错误 CS1022:类型或命名空间定义,或预期文件结尾
- html - 如何将每个页面的数据保存到 csv
- java - OpenGL 中的 2D 图像纹理无法按预期工作
- python-3.x - 如何将 Excel 负值转换为 Pandas 负值
- c - 如何通过 C 中的函数在列表中插入/添加和删除字符串?
- c++ - 使用 CMAKE/CPack 根据版本设置 RPM 包名称
- spring-boot - JHipster rest api 只允许微服务