Description Usage Arguments Value References Examples
View source: R/top_relations.R
The similarity between two vectors is determined as follows:
cos(x,y) = (a • b) / (||a|| ||b||)
where (a • b
) is equal to the dot product of a
and b
, and
(||a|| ||b||
) is equal to the magnitude of a
and b
. This formula returns
the angle between the two vectors.
1 | most_similar(m, word, num_results = 10)
|
m |
A matrix. |
word |
An entry in |
num_results |
Number of results to display. |
A data table of words in m
most similar to x
.
“Word-Vectors and Search Engines.” Geometry and Meaning, by Dominic Widdows, CSLI Publications, 2004, pp. 132–166.
1 | most_similar(W, "loue")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.