Git Product home page Git Product logo

gnn-mo's Introduction

GNN-Math

data.py

In order to create data you just need to run data.py with the default values in the file for the following variables:

Variable Argument Description Default value
n -tn Total number of nodes which create N by N adjacency matrix 10
d1 -d1 Dimension of matrix X which is N by D1 3
d2 -d2 Dimension of matrix theta which is D1 by D2 4
sr -sr Selected row in the matrix 2
fr -f1 Density of the adjacency matrix 0.6
cn -f2 Condition of the problem - upper bound on #edges 0.5
ti -ti Total instances to generate 10

You can change default values by the following command:

>> python3 data.py -tn 20 -d1 12 -d2 14 -sr 5 -f1 0.4 -f2 0.5 -ti 5

output:

=========================================================
=========================================================
Namespace(N=20, D1=12, D2=14, SR=5, Fr=0.4, Cn=0.3, TI=5)
=========================================================
=========================================================

Press y to continue and any other key to exit!

You can use the help to get brief information on each arg:

>> python3 data.py -h

You will find the generated data in the folder "GNNINPUT". Input data are named by increasing integer values, but you can find detailed information on each file in the "GeneralInfo.txt".

Content of each pickle is a dictionary with keys of

Key Description Size
A Adjacency matrix n by n
X Feature matrix n by d1
T Converting matrix d1 by d2
R Selected node 1 by 1
L Upper bound on number of edges 1 by 1

gnn-mo's People

Contributors

hesamshaelaie avatar

Watchers

 avatar

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.