We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://towardsdatascience.com/word2vec-explained-49c52b4ccb71
Vatsal
Implementation
w = w2v( filtered_lines, min_count=3, sg = 1, window=7 ) print(w.wv.most_similar('thou')) emb_df = ( pd.DataFrame( [w.wv.get_vector(str(n)) for n in w.wv.key_to_index], index = w.wv.key_to_index ) ) print(emb_df.shape) emb_df.head() pca = PCA(n_components=2, random_state=7) pca_mdl = pca.fit_transform(emb_df) emb_df_PCA = ( pd.DataFrame( pca_mdl, columns=['x','y'], index = emb_df.index ) ) plt.clf() fig = plt.figure(figsize=(6,4)) plt.scatter( x = emb_df_PCA['x'], y = emb_df_PCA['y'], s = 0.4, color = 'maroon', alpha = 0.5 ) plt.xlabel('PCA-1') plt.ylabel('PCA-2') plt.title('PCA Visualization') plt.plot()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TL;DR
Article Link
https://towardsdatascience.com/word2vec-explained-49c52b4ccb71
Author
Vatsal
Key Takeaways
Implementation
Useful Code Snippets
Useful Tools
Comments/ Questions
The text was updated successfully, but these errors were encountered: