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

Is it possible to run node2vec on multi graphs ? #103

Open
astrung opened this issue Oct 13, 2020 · 3 comments
Open

Is it possible to run node2vec on multi graphs ? #103

astrung opened this issue Oct 13, 2020 · 3 comments

Comments

@astrung
Copy link

astrung commented Oct 13, 2020

As explained confirmation from all node2vec papers, this algorithm is designed for 1 graph. It create specific embedding for each graph, so it is not possible for training node2vec model on a graph, then use trained model for another graphs. In other words, if i have 2 graphs G and H, i need 2 embedding models:

G_node2vec = Node2Vec(G)
G_model =  G_node2vec.fit()
H_node2vec = Node2Vec(H)
H_model =  H_node2vec.fit()

Then we have a new graph J. Because this graph share some characteristics with graph G and H, i want to use node2vec embedding model from both model G and H to get embedding on J without training a new node2vec model for graph J. I have 2 questions:

  1. In theory, can we train node2vec for multi graphs, then use embedding for another (not trained) graph? What is possible solution?

  2. I am thinking about a solution: Disjoin all training graphs into a graph then create node2vec model on union graph, then use this model to predict non-trained graph. Is it correct ?

    union_graph = disjoint_union(G, H)
    union_node2vec = Node2Vec(union_graph)
    union_model = union_node2vec.fit()
    embedded_J = union_model.predict(J)

If you have any other approaches please share your ideas. I have just started in graph theory and algorithms 2 months ago

@A2Amir
Copy link

A2Amir commented Aug 4, 2022

have you found the answer?
I have the same question.

@astrung
Copy link
Author

astrung commented Aug 5, 2022

@A2Amir sorry but i dropped this approach. Let wait for the others :(

@A2Amir
Copy link

A2Amir commented Aug 17, 2022

Please share with me your approach.

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