corr_embeds: Compute the correlation of a given cue's similarity vectors...

Description Usage Arguments Value Note

View source: R/corr_embeds.R

Description

Compute the correlation of a given cue's similarity vectors for two embedding models

Usage

1
2
3
4
5
6
7
8
corr_embeds(
  embeds1,
  embeds2,
  cue,
  type = "pearson",
  method = "cosine",
  norm = "l2"
)

Arguments

embeds1

embeddings model 1 (V by D matrix)

embeds2

embeddings model 2 (V by D matrix)

cue

cue word for which the correlation will be computed

type

pearson or rank correlation

method

a param of text2vec's sim2: character, the similarity measure to be used. One of c("cosine","jaccard").

norm

a param of text2vec's sim2: character = c("l2","none") - how to scale input matrices. If they already scaled - use "none"

Value

a numeric value between -1 and 1

Note

embedding models will be subsetted to common vocabulary


prodriguezsosa/weeval documentation built on Aug. 15, 2020, 7:01 a.m.