Expand description
Training visualisation: loss curves and 2D PCA word projection plots.
Uses [plotters] to render PNG files.
§Example
use word2vec::plot::{plot_loss_curve, plot_word_vectors_pca};
use word2vec::trainer::EpochStats;
// After training:
// plot_loss_curve(&trainer.history, "loss.png").unwrap();
// plot_word_vectors_pca(&embeddings, 50, "pca.png").unwrap();Functions§
- plot_
loss_ curve - Render a loss-vs-epoch line chart to a PNG file.
- plot_
word_ vectors_ pca - Project the top-
n_wordsmost frequent words into 2D using PCA (covariance-free: uses power iteration on two principal components) and render a scatter plot with word labels.