MKLab-ITI/JGNN

Dataset Builder

Closed this issue · 2 comments

very interesting works, i think this library will very useful in future for projects or research which use graph neural network as model.
I have a question, it seems the dataset is only from automatic download from previous research, there is possible for dataset generation builder which is we can build our own dataset? thank you.

Hi and thank you for the interest!

The existing datasets are mostly there for instructive/benchmark purposes and you can create new ones by creating data matrices within your code. For example, you can create node feature matrices like this:

Matrix features = new DenseMatrix(numNodes, numFeatures);
for(long nodeId : ...) 
    for(long featureId : ...)
        features.put(nodeId, featureId, featureValue);

and graph adjacency matrices like this (don't forget to normalize them - see the recently added tutorial on building GNNs):

Matrix adjacency = new SparseMatrix(numNodes, numNodes);
for(Entry<Long, Long> pairs : ....)
   adjacency.put(pairs.getKey(), pairs.getValue(), 1.);

Is the issue that this is not apparent from the documentation? (I will add more instructions anyway.)
Or was this understood already but it was unweildy for practical applications?

P.S. The automatic download will not be working for a couple of days as we are in the process of removing dependencies on zip format libraries.

i see, this is what i look up.
i just read read from tutorial documentation that not mentioned code above, i think it wll be nice to add this in documentation or instruction. Thanks for the answer.