visual graph入门教程visual graph入门教程visual graph入门教程visual graph入门教程visual graph入门教程
2019-12-21 20:09:37 1.52MB visual graph入门教程
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
关于子图同构算法VF2的论文,实现和测试数据。用于学习子图同构算法,用作借鉴。
2019-12-21 19:54:51 1.2MB Graph isomorphism VF2 代码,论文
1
经典书籍:An Introduction to the Theory of Graph Spectra PDF版
2019-12-21 19:53:57 9.55MB Graph Spectra
1
图论导引习题答案 第二版 Introduction to Graph Theory solution manual SECOND EDITION (2001) SUMMER 2005 VERSION DOUGLAS B. WEST MATHEMATICS DEPARTMENT UNIVERSITY OF ILLINOIS
2019-12-21 19:46:22 3.36MB 图引论 习题答案
1
图割和graph cut 实现的交互式图像分割,实现了图割的交互式分割和两者的结合。对学习图割的人有很大帮助。
1
S7-Graph汉化,测试过,好用。复制替换到s7graph文件中即可。
2019-12-21 19:45:19 618KB S7-Graph汉化
1
用于统计计算网络中的各种拓扑特性,例如:节点度、聚集系数、网络直径等
2019-12-21 19:44:32 180KB matlab graph analysis
1
统计软件,用于实证研究中对样本的分析,适合验证性因素分析,路径分析,给需要的人。
2019-12-21 19:41:52 1.32MB spss 统计 路径分析
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