NLP, Python, Scikit Learn.
3D vectors creates a good separation: x_train_padded = pad_word_vectors(x_train,300000) x_train_3d = pca_reduce(x_train_padded,3) n_clusters = 5 model = KMeans(n_clusters, random_state=0, n_init="auto").fit(x_train_3d) print(model.labels_) #[0 0 1 2 2 2 2 0 0 0 0 4 0 3 0 4 0 2 4 3 4 4 1 0 3 4 0 3 4