利用python绘制热图、计算网络节点degree、kshell、介数中心性、接近中心性、特征向量中心性、PageRank,计算相关性含环境、代码、数据源
2019-12-21 21:11:14 56.89MB python 复杂网络 matplotlib
1
可以使用pip install 直接在mac 系统上安装并且使用的igraph包
2019-12-21 20:31:10 367KB 复杂网络 igraph 图布局 网络算法
1
# GPF ## 一、GPF(Graph Processing Flow):利用图神经网络处理问题的一般化流程 1、图节点预表示:利用NE框架,直接获得全图每个节点的Embedding; 2、正负样本采样:(1)单节点样本;(2)节点对样本; 3、抽取封闭子图:可做类化处理,建立一种通用图数据结构; 4、子图特征融合:预表示、节点特征、全局特征、边特征; 5、网络配置:可以是图输入、图输出的网络;也可以是图输入,分类/聚类结果输出的网络; 6、训练和测试; ## 二、主要文件: 1、graph.py:读入图数据; 2、embeddings.py:预表示学习; 3、sample.py:采样; 4、subgraphs.py/s2vGraph.py:抽取子图; 5、batchgraph.py:子图特征融合; 6、classifier.py:网络配置; 7、parameters.py/until.py:参数配置/帮助文件; ## 三、使用 1、在parameters.py中配置相关参数(可默认); 2、在example/文件夹中运行相应的案例文件--包括链接预测、节点状态预测; 以链接预测为例: ### 1、导入配置参数 ```from parameters import parser, cmd_embed, cmd_opt``` ### 2、参数转换 ``` args = parser.parse_args() args.cuda = not args.noCuda and torch.cuda.is_available() torch.manual_seed(args.seed) if args.cuda: torch.cuda.manual_seed(args.seed) if args.hop != 'auto': args.hop = int(args.hop) if args.maxNodesPerHop is not None: args.maxNodesPerHop = int(args.maxNodesPerHop) ``` ### 3、读取数据 ``` g = graph.Graph() g.read_edgelist(filename=args.dataName, weighted=args.weighted, directed=args.directed) g.read_node_status(filename=args.labelName) ``` ### 4、获取全图节点的Embedding ``` embed_args = cmd_embed.parse_args() embeddings = embeddings.learn_embeddings(g, embed_args) node_information = embeddings #print node_information ``` ### 5、正负节点采样 ``` train, train_status, test, test_status = sample.sample_single(g, args.testRatio, max_train_num=args.maxTrainNum) ``` ### 6、抽取节点对的封闭子图 ``` net = until.nxG_to_mat(g) #print net train_graphs, test_graphs, max_n_label = subgraphs.singleSubgraphs(net, train, train_status, test, test_status, args.hop, args.maxNodesPerHop, node_information) print('# train: %d, # test: %d' % (len(train_graphs), len(test_graphs))) ``` ### 7、加载网络模型,并在classifier中配置相关参数 ``` cmd_args = cmd_opt.parse_args() cmd_args.feat_dim = max_n_label + 1 cmd_args.attr_dim = node_information.shape[1] cmd_args.latent_dim = [int(x) for x in cmd_args.latent_dim.split('-')] if len(cmd_args.latent_dim)
2019-12-21 20:00:21 119KB 图神经网络 Graph Proces GPF
1
图神经网络论文的介绍,包括多种Graph Embedding、GCN、序列方式的处理。
2019-12-21 19:55:24 8.88MB 图神经网络 图深度学习 GNN GCN
1
GGNN和GCN的几篇论文笔记,介绍常用的两种图神经网络。个人笔记。
2019-12-21 19:55:24 3MB 图神经网络 图深度学习 GNN GCN
1
by Maarten van Steen (Author) ============================= This book aims to explain the basics of graph theory that are needed at an introductory level for students in computer or information sciences. To motivate students and to show that even these basic notions can be extremely useful, the book also aims to provide an introduction to the modern field of network science. Mathematics is often unnecessarily difficult for students, at times even intimidating. For this reason, explicit attention is paid in the first chapters to mathematical notations and proof techniques, emphasizing that the notations form the biggest obstacle, not the mathematical concepts themselves. This approach allows to gradually prepare students for using tools that are necessary to put graph theory to work: complex networks. In the second part of the book the student learns about random networks, small worlds, the structure of the Internet and the Web, peer-to-peer systems, and social networks. Again, everything is discussed at an elementary level, but such that in the end students indeed have the feeling that they: 1.Have learned how to read and understand the basic mathematics related to graph theory.
2019-12-21 19:41:12 5.73MB 图论 随机图 复杂网络
1
图与网络优化 对策论 动态规划 运输问题 目标规划
1
Random Graphs: 经典的随机图教材,由剑桥大学2001年出版。 是学习随机图、复杂网络 的极好资料。 格式: PDF(带目录) 作者:Béla Bollobás 版次:第2版 (英文原版) 出版社: Cambridge University Press; 2 edition (October 8, 2001)=================================== 具体书见: http://www.amazon.com/Random-Cambridge-Studies-Advanced-Mathematics/dp/0521797225 Paperback: 518 pages Publisher: Cambridge University Press; 2 edition (October 8, 2001) Language: English ISBN-10: 0521797225 ISBN-13: 978-0521797221 =======================
2011-10-20 00:00:00 16.1MB Random graphs 随机图 复杂网络
1