Skip to content

Instantly share code, notes, and snippets.

@jelmerk
Created September 21, 2020 08:38
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 jelmerk/0b9a7f6e197ef99dd9702ced893fdd4f to your computer and use it in GitHub Desktop.
Save jelmerk/0b9a7f6e197ef99dd9702ced893fdd4f to your computer and use it in GitHub Desktop.
val h2oSequences = ...
val w2vParams = new Word2VecParameters
w2vParams._train = h2oSequences._key
w2vParams._epochs = 1
w2vParams._min_word_freq = 0
w2vParams._init_learning_rate = 0.05f
w2vParams._window_size = 5
w2vParams._vec_size = 256
w2vParams._sent_sample_rate = 0.1f
val w2v = new Word2Vec(w2vParams).trainModel().get()
val vectors = h2oContext.asDataFrame(w2v.toFrame) // crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment