When I train a word2vec model in Gensim on a huge amount of words/data (let's say hundreds of thousands of word vectors), is gensim using negative sampling automatically?

Alternatively, is there a way to make it use it?


1 Answer 1


Gensim's word2vec can use negative sampling. When calling class gensim.models.word2vec.Word2Vec, there is a parameter negative. The default amount is negative=5.

negative (int, optional) – If > 0, negative sampling will be used, the int for negative specifies how many “noise words” should be drawn (usually between 5-20). If set to 0, no negative sampling is used.

The documentation is here.

  • $\begingroup$ Please correct me if I'm wrong: the default is the number of 'negative' observations sampled for the logistic regression, right? $\endgroup$
    – Leevo
    Commented Jul 17, 2019 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.