View source: R/matrixFunctions.R
improve_vectorspace | R Documentation |
See reference for a full description. Supposedly, these operations will improve performance on analogy tasks.
improve_vectorspace(vectorspace, D = round(ncol(vectorspace)/100))
vectorspace |
A VectorSpacemodel to be improved. |
D |
The number of principal components to eliminate. |
A VectorSpaceModel object, transformed from the original.
Jiaqi Mu, Suma Bhat, Pramod Viswanath. All-but-the-Top: Simple and Effective Postprocessing for Word Representations. https://arxiv.org/abs/1702.01417.
closest_to(demo_vectors,"great") # stopwords like "and" and "very" are no longer top ten. # I don't know if this is really better, though. closest_to(improve_vectorspace(demo_vectors),"great")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.