AnacletoLAB / grape

🍇 GRAPE is a Rust/Python Graph Representation Learning library for Predictions and Evaluations
MIT License
502 stars 38 forks source link

why does get_all_node_embedding return a list of embedding matrix? #40

Closed chansigit closed 1 year ago

LucaCappelletti94 commented 1 year ago

Could you:

  1. Provide the code you are using
  2. Mention the embedding method you are using
  3. Describe what is the behaviour you expect, and why the behaviour you see is unexpected.
chansigit commented 1 year ago

I am working a graph g_dtw:

embedding = Node2VecGloVeEnsmallen(embedding_size=50, walk_length=10, max_neighbours=20).fit_transform(g_dtw)

and try to get the embedding results:

z1 = embedding.get_all_node_embedding()

only to find the returned z1 is a list containing 2 embedding matrices. Why?

LucaCappelletti94 commented 1 year ago

I am not sure what other thing you would expect - let me break it down for you.

I hope this clarifies to you why these models have two distinct node embedding with different characteristics.

If you are referring to the choice of several libraries to not make these or several other features available, you should go ask them.

chansigit commented 1 year ago

Thank you so much for your teaching!

I thought only one embedding would be returned.

LucaCappelletti94 commented 1 year ago

No worries, I understand that there is some confusion regarding these topics. Could you take a minute to describe to me how the library experience could be improved to help you more intuitively understand what was happening?

chansigit commented 1 year ago

docstring! I tried to understand the output by myself but this function does not seem to have a docstring. Descriptions about returned list should clarify the function's design.

chansigit commented 1 year ago

you are so devoted to grape. I am glad to introduce your work to my colleagues.