find_cos_sim: Find cosine similarities between target and candidate words

View source: R/get_seq_cos_sim.R

find_cos_simR Documentation

Find cosine similarities between target and candidate words

Description

Find cosine similarities between target and candidate words

Usage

find_cos_sim(target_embedding, pre_trained, candidates, norm = "l2")

Arguments

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)

Value

a vector of cosine similarities of length candidates


conText documentation built on Feb. 16, 2023, 7:32 p.m.