plot-VectorSpaceModel-method: Plot a Vector Space Model.

plot,VectorSpaceModel-methodR Documentation

Plot a Vector Space Model.

Description

Visualizing a model as a whole is sort of undefined. I think the sanest thing to do is reduce the full model down to two dimensions using T-SNE, which preserves some of the local clusters.

Usage

## S4 method for signature 'VectorSpaceModel'
plot(x, method = "tsne", ...)

Arguments

x

The model to plot

method

The method to use for plotting. "pca" is principal components, "tsne" is t-sne

...

Further arguments passed to the plotting method.

Details

For individual subsections, it can make sense to do a principal components plot of the space of just those letters. This is what happens if method is pca. On the full vocab, it's kind of a mess.

This plots only the first 300 words in the model.

Value

The TSNE model (silently.)


bmschmidt/wordVectors documentation built on June 2, 2022, 3:53 p.m.