Link Prediction on Heterogeneous Graphs/ Recommendation system #4409
Unanswered
radojicicmarinaa
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Yes, this is normal. In the MovieLens example, we are actually doing link-level classification, and we do not infer missing links. You can easily enfore that by setting |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have been working on a project that involves link prediction using Heterogeneous graph. ( data are read from neo4j and are then elaborated using PyTorch geometric)
The idea of the project can be represented in the same way as in the article about Movies recommendations.
( Movie recommendation tutorial I followed: https://github.com/tomasonjo/blogs/blob/master/pyg2neo/Movie_recommendations.ipynb )
I have 3 nodes: Movie, Cinema and User.
I cannot consider all the movies to recommend, as a user can only watch movies in a specific cinema and cinemas between them have different film timetables. ( for the sake of simplicity we will consider that timetables and list of films do not change during the time)
Goal: I would like to predict the movie the user will see next.
In the graph DB two nodes are connected IFF a user saw a specific film. ( edge User - Movie)
One of the things that I noticed is that when I am trying to apply the Heterodata class and see the obtained edge labels, I only get 1 class.
( code example: data['user', 'watch', 'asset'].edge_label = edge_label )
On the other hand, in the Movie recommendation article there were 6 classes: from 0 to 5. ( multi class problem)
In my case, edge label contains only label that is equal to 1 and edge_label has the same length as the edge_index.
Could you please help me understand whether this behaviour is normal, or I should do some changes in the DB in order to obtain both 0 and 1 labels after applying HeteroData(). ( 0 = the link does not exist, 1 = the link exists)
Last but not least, could this thing be handled in the RandomLinkSplit function adding parameter neg_sampling_ratio ?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions