View source: R/bootstrap_nns.R
bootstrap_similarity | R Documentation |
Boostrap similarity vector
bootstrap_similarity( target_embeddings = NULL, pre_trained = NULL, candidates = NULL, norm = NULL )
target_embeddings |
the target embeddings (embeddings of context) |
pre_trained |
a V x D matrix of numeric values - pretrained embeddings with V = size of vocabulary and D = embedding dimensions |
candidates |
character vector defining the candidates for nearest neighbors - e.g. output from |
norm |
character = c("l2", "none") - set to 'l2' for cosine similarity and to 'none' for inner product (see ?sim2 in text2vec) |
vector(s) of cosine similarities between alc embedding and nearest neighbor candidates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.