Skip to main content

plot_word_vectors_pca

Function plot_word_vectors_pca 

Source
pub fn plot_word_vectors_pca(
    emb: &Embeddings,
    n_words: usize,
    output_path: &str,
) -> Result<()>
Expand description

Project the top-n_words most frequent words into 2D using PCA (covariance-free: uses power iteration on two principal components) and render a scatter plot with word labels.