#Video Recommendation using Knowledge-Graph-Embedding This is the code of a knowledge graph embedding framework – RKGE – with a novel recurrent network architecture for high-quality recommendation. RKGE [1] not only learns the semantic representation of different types of entities but also automatically captures entity relations encoded in KGs.
-
-
Python 3
-
Pytorch (conda 4.5.11 - https://zhuanlan.zhihu.com/p/26854386)
-
-
-
Split the user-movie rating data into training and test data
-
Input Data: rating-delete-missing-itemid.txt
-
Output Data: training.txt, test.txt
-
-
-
-
Sample negative movies for each user to balance the model training
-
Input Data: training.txt
-
Output Data: negative.txt
-
-
-
-
Extract paths for both positive and negative user-moive interaction
-
Input Data: training.txt, negative.txt, auxiliary-mapping.txt,
-
Output Data: positive-path.txt, negative-path.txt
-
-
-
-
Feed both postive and negative path into the recurrent neural network, train and evaluate the model
-
Input Data: positive-path.txt, negative-path.txt, training.txt, test.txt, pre-train-user-embedding.txt, pre-train-movie-embedding.txt (To speed up model training process, the user and movie embedding is pre-trained via [2]. You may also use matrix factorization [3] or bayesain personalized ranking [4] to pre-train the embeddings).
-
Output Data: results.txt
-
-