View source: R/get_seq_cos_sim.R
find_cos_sim | R Documentation |
Find cosine similarities between target and candidate words
find_cos_sim(target_embedding, pre_trained, candidates, norm = "l2")
target_embedding |
matrix of numeric values |
pre_trained |
matrix of numeric values - pretrained embeddings |
candidates |
character vector defining vocabulary to subset comparison to |
norm |
character = c("l2", "none") - how to scale input matrices. If they are already scaled - use "none" (see ?sim2) |
a vector of cosine similarities of length candidates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.