View source: R/similarity_map.R
similarity_map | R Documentation |
Build a scatterplot that represents the conceptual structure of a keyword.
similarity_map(
mat,
keyword,
method = "cosine",
margin = 1,
numResults = 40,
numGrps = 5
)
mat |
A word-context matrix. |
keyword |
A string. |
method |
A character string: 'cosine', 'euclidean', 'pearson' or 'covariance', which names the mathematical similarity test to be performed. Default is 'cosine'. |
margin |
Numeric value: 1 or 2. If 1, calculations are performed over the rows. If 2, over the columns. |
numResults |
Numeric value. The number of words to be displayed in the graph. Default is 40. |
numGrps |
Numeric value. The number of groups in which you'd like to divide the display. Default is 5. |
A scatterplot showing structure of 30 most-similar words.
This function runs similarity
over a word-context matrix and looks for the
thirty most similar terms, then clusters them.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.