简单图形
Python-EasyGraph的Python项目详细描述
版权所有(C)<;2020>;复旦大学移动系统与网络集团
- 文档:https://easy-graph.github.io/
- 源:https://github.com/easy-graph/Easy-Graph
- 错误报告:https://github.com/easy-graph/Easy-Graph/issues
- PyPI主页:https://pypi.org/project/Python-EasyGraph/
简介
EasyGraph是一个开源的图形处理库。它是用Python编写的,支持无向图和有向图的分析。介绍了结构孔扳手检测、图形嵌入等先进的图形处理方法和几种经典的方法(子图生成、连通构件发现和同构图生成)。在
EasyGraph集成了最先进的图形处理方法,并使用Python实现了它们。EasyGraph涵盖了一系列先进的图形处理算法,包括结构孔扳手检测(HIS、MaxD、Common峎Greedy、AP_Greedy和HAM)以及图形表示学习(DeepWalk、Node2Vec、LINE和SDNE)。此外,对于一些通用的图形处理方法,EasyGraph对算法进行了优化,并引入了并行计算方法,以达到高效率。在
安装
使用pip
$ pip install Python-EasyGraph
或conda
^{pr2}$简单的例子
这是一个检测sturctural hole spanners的简单示例 使用HIS算法。在
>>>importeasygraphaseg>>>G=eg.Graph()>>>G.add_edges([(1,2),(2,3),(1,3),(3,4),(4,5),(3,5),(5,6)])>>>_,_,H=eg.get_structural_holes_HIS(G,C=[frozenset([1,2,3]),frozenset([4,5,6])])>>>H# The structural hole score of each node. Note that node `4` is regarded as the most possible structural hole spanner.{1:{0:0.703948974609375},2:{0:0.703948974609375},3:{0:1.2799804687499998},4:{0:1.519976806640625},5:{0:1.519976806640625},6:{0:0.83595703125}}
- 项目
标签: