compute_contrast {conText} | R Documentation |
Compute similarity and similarity ratios
Description
Compute similarity and similarity ratios
Usage
compute_contrast(
target_embeddings1 = NULL,
target_embeddings2 = NULL,
pre_trained = NULL,
candidates = NULL,
norm = NULL
)
Arguments
target_embeddings1 |
ALC embeddings for group 1 |
target_embeddings2 |
ALC embeddings for group 2 |
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) |
Value
a list with three elements, nns for group 1, nns for group 2 and nns_ratio comparing with ratios of similarities between the two groups
[Package conText version 1.4.3 Index]