Description Usage Arguments Value References Examples
View source: R/top_relations.R
The correlation coefficient between vectors x
and y
is calculated
using
cor(x,y) = cov(x,y) / sqrt( var(x) * var(y) )
In this function, this formula is
applied between x
all other word vectors in matrix m
, and the resulting
correlation coefficients are sorted and returned in the form of a data table.
1 | most_correlated(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 correlated with x
.
“Displaying and Summarizing Data.” Introduction to Bayesian Statistics, by William M. Bolstad, 2nd ed., Wiley, 2007, pp. 29–54.
1 | most_correlated(W, "loue")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.