R包'word2vec' doc2vec函数

R package 'word2vec' doc2vec function

我是一名学生(计算机科学)。这是我在 Whosebug 中的第一个问题。我真的很感激你的帮助! (我指的包叫做 'word2vec',这就是为什么 tags/title 有点难以选择的原因。)

在 doc2vec 函数的描述中(此处 https://cran.r-project.org/web/packages/word2vec/word2vec.pdf)它说:

Document vectors are the sum of the vectors of the words which are part of the document standardised by the scale of the vector space. This scale is the sqrt of the average inner product of the vector elements.

据我了解,doc2vec 为每个段落增加了一个向量。在我看来,这似乎与上述描述不同。

我对 doc2vec 的理解是否正确或足够接近? 并且:引用的实现是否像 doc2vec 算法一样工作?

许多人使用“Doc2Vec”来指代标题为 Distributed Representation of Sentences and Documents(Le 和 Mikolov 着)的论文介绍的类似 word2vec 的算法。该论文称该算法为 'Paragraph Vector',但没有使用名称 'Doc2Vec',并且确实为每个文档引入了一个额外的向量,就像您所描述的那样。 (也就是说,doc-vector 的训练有点像 'floating' pseudoword-vector,这有助于该文档中每个训练预测的输入 'context'。)

我不熟悉 R 或那个 R word2vec 包,但从您转发的文档来看,不像 doc2vec函数实现了其他人称为'Doc2Vec' 的'Paragraph Vector' 算法。特别是:

  • 'Paragraph Vector' doc-vector不是一个简单的sum-of-word-vectors

  • 'Paragraph Vector' doc-vector 是由一个类似 word2vec 的单独训练过程创建的,co-creates 任何必要的 word-vectors 与该训练同时进行。具体来说:该过程 不会 通常使用其他 pre-trained word-vectors 作为输入,也不会创建 word-vectors 作为第一步。 (此外:'Paragraph Vector' 论文的 PV-DBOW 选项根本不会创建传统的 word-vectors。)

函数似乎是 poorly-named,如果您需要使用实际的 'Paragraph Vector' 算法,则需要查看其他地方。