GithubHelp home page GithubHelp logo

graphdatatonetworkxgraphlist's Introduction

GraphDataToNetworkxGraphList

Reads graph data from:

https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets

and outputs them as a list of python networkx graphs, see the details below.

Functions:

  1. graph_data_to_graph_list(path, db) Takes database path {path} and database-name {db} and outputs the graph data in form of a triple: (graph_list, graph_labels, graph_attributes)

    -graph_list: #python list of networkx graphs with graph information given by the database

    -graph_labels: #python list of integers as the labels of the graphs according to the database

    -graph_attributes: #python list with additional attributes of the graphs according to the database or empty list if there are none

  2. node_label_vector(graph, node_id) #outputs vector of node_label of node with {node_id} in graph {graph}

  3. node_attribute_vector(graph, node_id) #outputs vector of node_attributes of node with {node_id} in graph {graph}

  4. nodes_label_matrix(graph) #same as above but outputs all labels of nodes of graph {graph}

  5. nodes_attribute_matrix(graph) #same as above but outputs all attributes of nodes of graph {graph}

  6. edge_label(graph, node_i, node_j) #outputs vector of edge_labels of edge (node_i, node_j) in graph {graph}

  7. edge_attribute_matrix(graph, node_i, node_j) #outputs vector of edge_attributes of edge (node_i, node_j) in graph {graph}

======= Python example:

path = "path_to_dbs/"
db = "MUTAG"
graph_data = graph_data_to_graph_list(path, db)
graph_list, graph_labels, graph_attributes = graph_data

graphdatatonetworkxgraphlist's People

Contributors

fseiffarth avatar pwelke avatar

Watchers

 avatar

Forkers

pwelke

graphdatatonetworkxgraphlist's Issues

Parsing Issue with Fingerprint Dataset

The Fingerprint dataset seems to be incorrectly processed by the converter function.
The following code snippet can be used to reproduce the problem, that is: all graphs from index 2149 in the dataset will have zero vertices and edges (which is not the case).

import GraphDataToNetworkxGraphList.GraphDataToGraphList as g2l
graphs = g2l.graph_data_to_graph_list(db='Fingerprint', path='./DS_all/')

problembaer = graphs[0][2149]
print(problembaer.number_of_nodes())

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.