Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters to run node2vec on custom dataet #2

Open
meghalD opened this issue Mar 26, 2020 · 1 comment
Open

Parameters to run node2vec on custom dataet #2

meghalD opened this issue Mar 26, 2020 · 1 comment

Comments

@meghalD
Copy link

meghalD commented Mar 26, 2020

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.

@Tixierae
Copy link
Owner

Tixierae commented May 22, 2020

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: aditya-grover/node2vec#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants