Update Word2Vec kwargs (#66)
This commit is contained in:
parent
7e26f8a0b6
commit
b39ff95370
@ -40,15 +40,14 @@ class Node2Vec:
|
||||
num_walks=num_walks, walk_length=walk_length, workers=workers, verbose=1)
|
||||
|
||||
def train(self, embed_size=128, window_size=5, workers=3, iter=5, **kwargs):
|
||||
|
||||
kwargs["sentences"] = self.sentences
|
||||
kwargs["min_count"] = kwargs.get("min_count", 0)
|
||||
kwargs["size"] = embed_size
|
||||
kwargs["vector_size"] = embed_size
|
||||
kwargs["sg"] = 1
|
||||
kwargs["hs"] = 0 # node2vec not use Hierarchical Softmax
|
||||
kwargs["workers"] = workers
|
||||
kwargs["window"] = window_size
|
||||
kwargs["iter"] = iter
|
||||
kwargs["epochs"] = iter
|
||||
|
||||
print("Learning embedding vectors...")
|
||||
model = Word2Vec(**kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user