[R] Re-implementation of RDF2Vec: generating embeddings for (RDF) Knowledge Graph entities using random walks and Word2Vec
I recently re-implemented RDF2VEC completely in Python due to the fact that the provided code in that paper is partially written in Java. RDF2Vec is an unsupervised, task-agnostic algorithm that creates an embedding for different nodes in a Knowledge Graph that can be used for further downstream tasks (such as classification or link prediction). To do this, RDF2Vec first creates “sentences” which can be fed to Word2Vec by extracting random walks of a certain depth from the Knowledge Graph. To create a random walk, we initialize its first hop to be one of the specified training entities in our KG. Then, we can iteratively extend our random walk by sampling out of the neighbors from the last hop of our walk.
The code can be found on Github.
Original paper: here (other, open versions can be found)
Original code (java for walks, python/gensim for word2vec): here