Skip to content

Instantly share code, notes, and snippets.

@rafaljanwojcik
Created November 26, 2019 18:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rafaljanwojcik/275f18d3a02f6946d11f3bf50a563c2b to your computer and use it in GitHub Desktop.
word_vectors = Word2Vec.load("../preprocessing_and_embeddings/word2vec.model").wv
model = KMeans(n_clusters=2, max_iter=1000, random_state=True, n_init=50).fit(X=word_vectors.vectors)
positive_cluster_center = model.cluster_centers_[0]
negative_cluster_center = model.cluster_centers_[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment