graph_2D_CNN icon indicating copy to clipboard operation
graph_2D_CNN copied to clipboard

Parameters to run node2vec on custom dataet

Open meghalD opened this issue 4 years ago • 1 comments

I have a custom dataset: Graphs: 79 Classes: 12 Nodes in each graph : min: 4 max: 770 The task is to classify 79 graphs into 12 classes. The parameters are to be set for node2vec: no. of walks, walk length , other arguments to be passed in the code. How are these decided and set for such a data. Please help. I want to make histogram 2D images from this data and run a 2D CNN model.

meghalD avatar Mar 26 '20 05:03 meghalD

Hi, sorry for the very late reply. The parameters indeed seem to have a big impact on the results and it is not clear what are good priors for them. It obviously depends on the graphs.

You may have a look at the resources linked in this thread: https://github.com/aditya-grover/node2vec/issues/2

Some rules of thumb that I came up with (not sure if they are the best, but at least they worked in my applications):

  • for networks that are quite dense and have rather low diameters, use short walk lengths (e.g., 8) and small windows (e.g., k=2 - k being half the window size)

  • the fewer the nodes in the networks, the smaller the embedding space should be. For instance, for less than 100 nodes, it does not make sense to have embedding spaces with more than 10 dimensions.

  • don't forget to add the -w flag to your calls if your networks are weighted

Tixierae avatar May 22 '20 08:05 Tixierae