CreateEmbeddingMatrix: Create a matrix of embeddings

Description Usage Arguments Value Examples

Description

Create a matrix of embeddings

Usage

1
2
CreateEmbeddingMatrix(DocTermMatrix, Embeddings, Vocabulary,
  LogInverse = F, Variance = F)

Arguments

DocTermMatrix

The document term matrix

Embeddings

The matrix of embeddings (e.g. Glove) where rows are words

Vocabulary

The Vocab list or dataframe from Create_Vocab_DocumentTermMatrix; needed if using LogInverse

LogInverse

whether to weight words using LogInverse; defaults to FALSE

Variance

whether to return embedding variance; defaults to FALSE

Value

Returns the average embedding of each document for each embedding dimension. If Variance requested then it is appended.

Examples

1
CreateEmbeddingMatrix(MyDocTermMatrix, Glove.200, Vocab, LogInverse=F,Variance=F)

adrianapaza/easynlp documentation built on May 9, 2019, 7:31 p.m.