Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created July 28, 2019 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/6c48134227beddeb45c91d6c0ac7c5a7 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/6c48134227beddeb45c91d6c0ac7c5a7 to your computer and use it in GitHub Desktop.
# train word2vec model
model = Word2Vec(window = 10, sg = 1, hs = 0,
negative = 10, # for negative sampling
alpha=0.03, min_alpha=0.0007,
seed = 14)
model.build_vocab(purchases_train, progress_per=200)
model.train(purchases_train, total_examples = model.corpus_count,
epochs=10, report_delay=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment