Skip to content

Commit

Permalink
Node2vec - enforce that either negative_rate or hs are positive (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
imilinovic authored Aug 9, 2024
1 parent dbd5696 commit 8ba59c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/mage/node2vec_online_module/w2v_learners.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def partial_fit(self, sentences: List[List[Any]]) -> None:
"epochs": self.num_epochs,
"workers": self.threads,
}
if self.negative_rate < 0:
if self.negative_rate <= 0:
self.negative_rate = 0
self.model = Word2Vec(
sentences, negative=self.negative_rate, hs=1, **params
Expand Down

0 comments on commit 8ba59c3

Please sign in to comment.