.. _doc2vec: Doc2Vec ####### Review: Word2Vec Model ====================== * 使用 Word2Vec 模型,我们可以计算文档中每个单词的向量。但是如果我们想计算整个文档的向量怎么办?我们可以对文档中每个单词的向量进行平均 - 虽然这既快速又粗略,但它通常很有用。然而,还有更好的方法…… Doc2Vec ======= * Doc2Vec is a Model that represents each Document as a Vector. Gensim ====== * In Gensim, we refer to the ``Paragraph Vector`` model as Doc2Vec. There are two implementations:: Paragraph Vector - Distributed Memory (PV-DM) Paragraph Vector - Distributed Bag of Words (PV-DBOW) * PV-DM 类似于 Word2Vec CBOW。文档向量是通过训练神经网络来获得的,该神经网络基于上下文词向量和完整文档的文档向量的平均值来预测中心词的综合任务。 * PV-DBOW 类似于 Word2Vec SG。文档向量是通过训练神经网络来完成从完整文档的文档向量预测目标单词的综合任务而获得的。 参考 ==== * [论文]An Empirical Evaluation of Models of Text Document Similarity: https://hekyll.services.adelaide.edu.au/dspace/bitstream/2440/28910/1/hdl_28910.pdf * [论文]Doc2Vec algorithm: https://cs.stanford.edu/~quocle/paragraph_vector.pdf