Closed nnadine25 closed 3 years ago
RDF2Vec uses Word2Vec. Therefore, the use of CBOW or Skip-Gram is up to you, depending on your use case. The pyRDF2Vec
library uses gensim's Word2Vec implementation which by default uses CBOW. However, you can use Skip-Gram by modifying the sg
hyperparameter:
from pyrdf2vec.embedders import Word2Vec
# To use CBOW (default behavior):
w2v = Word2Vec(sg=0)
# To use Skip-Gram:
w2v = Word2Vec(sg=1)
Refer to the appropriate documentation for more information.
hi , i whould ask what is the algorithm used in rdf2vec : cbow or skip-gram , and how we can change from an algorithm to another ?